Bug 21034 - binutils/stabs.c:2705: if (**pp == ';' || *pp == '\0')
Summary: binutils/stabs.c:2705: if (**pp == ';' || *pp == '\0')
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.29
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-09 21:09 UTC by dilyan.palauzov@aegee.org
Modified: 2017-05-17 23:56 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dilyan.palauzov@aegee.org 2017-01-09 21:09:12 UTC
I think gcc 7 is right here:

gcc -DHAVE_CONFIG_H -I. -I/git/binutils-gdb/binutils  -I. -I/git/binutils-gdb/binutils -I../bfd -I/git/binutils-gdb/binutils/../bfd -I/git/binutils-gdb/binutils/../include -DLOCALEDIR="\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror  -MT stabs.o -MD -MP -MF .deps/stabs.Tpo -c -o stabs.o /git/binutils-gdb/binutils/stabs.c
/git/binutils-gdb/binutils/stabs.c: In function ‘parse_stab_members’:
/git/binutils-gdb/binutils/stabs.c:2705:31: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
        if (**pp == ';' || *pp == '\0')
                               ^~
/git/binutils-gdb/binutils/stabs.c:2705:27: note: did you mean to dereference the pointer?
        if (**pp == ';' || *pp == '\0')
                           ^
cc1: all warnings being treated as errors
make: *** [Makefile:962: stabs.o] Error 1
Comment 1 Nick Clifton 2017-01-10 11:46:25 UTC
Agreed - I have checked in the obvious fix.
Comment 2 Sourceware Commits 2017-01-10 11:46:27 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b972a0d61a8b6e1dc3f9baf93ef3e57c7bfb9715

commit b972a0d61a8b6e1dc3f9baf93ef3e57c7bfb9715
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Jan 10 11:45:12 2017 +0000

    Fix compile time warning about pointer comparison.
    
    	PR 21034
    	* stabs.c (parse_stab_members): Fix thinko checking for g++
    	version 1 stabs information.
Comment 3 Sourceware Commits 2017-05-17 23:56:13 UTC
The binutils-2_28-branch branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1663acb165d6f3f17a21750e1b1140005d5a25f0

commit 1663acb165d6f3f17a21750e1b1140005d5a25f0
Author: Alan Modra <amodra@gmail.com>
Date:   Thu May 18 09:07:26 2017 +0930

    Fix compile time warning about pointer comparison.
    
    	PR 21034
    	* stabs.c (parse_stab_members): Fix thinko checking for g++
    	version 1 stabs information.