This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [RFC] Change configure.in so -W arnings match reality
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: Re: [RFC] Change configure.in so -W arnings match reality
- From: David Whedon <davidw at gordian dot com>
- Date: Tue, 18 Apr 2000 14:49:52 -0700 (PDT)
I'm building the gdb 5.0 branch on our sgi and it has a problem with the
warning flags.
This error, I believe, is caused by this patch.
(http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00276.html)
My problem would be fixed if -Wreturn-type is removed from gdb/configure.in
(see the patch for more info)
I think it is because I am using an old gcc (October '99)
This error went away after I removed '-Wreturn-type' from the gdb/Makefile
WARN_CFLAGS line.
Here is the error:
gmake[1]: Entering directory `/n/delphi2/irix_52/usr/local/src/gdb-build/68k/gdb'
gcc -c -O2 -I. -I/usr/local/src/rib/gdb-5.0/src//gdb -I/usr/local/src/rib/gdb-5.0/src//gdb/config -DHAVE_CONFIG_H -I/usr/local/src/rib/gdb-5.0/src//gdb/../include/opcode -I/usr/local/src/rib/gdb-5.0/src//gdb/../readline/.. -I../bfd -I/usr/local/src/rib/gdb-5.0/src//gdb/../bfd -I/usr/local/src/rib/gdb-5.0/src//gdb/../include -I../intl -I/usr/local/src/rib/gdb-5.0/src//gdb/../intl -I/usr/local/src/rib/gdb-5.0/src//gdb/tui -DUSE_INCLUDED_REGEX -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith /usr/local/src/rib/gdb-5.0/src//gdb/main.c
cc1: Invalid option `-Wreturn-type'
gmake[1]: *** [main.o] Error 1
gmake[1]: Leaving directory `/n/delphi2/irix_52/usr/local/src/gdb-build/68k/gdb'
gmake: *** [all-gdb] Error 2
Other info:
# gcc -v
Reading specs from /usr/local/lib/gcc-lib/mips-sgi-irix5.3/2.95.2/specs
gcc version 2.95.2 19991024 (release)
# /usr/local/lib/gcc-lib/mips-sgi-irix5.3/2.95.2/cc1 --help | grep "\-W"
-W Enable extra warnings
-Winline Warn when an inlined function cannot be inlined
-Wuninitialized Warn about unitialized automatic variables
-Wcast-align Warn about pointer casts which increase alignment
-Waggregate-return Warn about returning structures, unions or arrays
-Wswitch Warn about enumerated switches missing a specific ce
-Wshadow Warn when one local variable shadows another
snip . . . . snip
I'll spare you the whole list, but -Wreturn-type isn't in there.
I'm not sure what else it could be, and I figure others could be bitten by this too, unless my gcc install is somehow non-standard.
-David