inconsistent CFLAGS between toplevel and gcc/

Ben Elliston bje@au1.ibm.com
Mon Jul 18 04:32:00 GMT 2005


I have recently been noticing inconsistent warnings when building GCC (for example,
warnings about uninitialised variables in gcc/ddg.c).  I had not realised it, but the
top-level CFLAGS defaults to "-g -O2" whereas gcc's Makefile sets CFLAGS to "-g" by
default.  So, if you compile this way:

  cd gcc; make

you miss uninitalised warnings and the like caught by:
  make all-gcc

at the toplevel.  Why shouldn't gcc's CFLAGS include -O2 given that most end-users
are building using the toplevel Makefile?

Cheers, Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20050718/0219835e/attachment.sig>


More information about the Gcc mailing list