This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question on -Werror usage in Makefiles...


 > From: Andreas Jaeger <aj@suse.de>
 > 
 > On x86_64-linux-gnu I get while compiling crtbegin.o:
 > 
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:37: warning: ISO C90 does not supp=
 > ort flexible array members
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:53: warning: bit-field 'sorted' ty=
 > pe invalid in ISO C
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:54: warning: bit-field 'from_array=
 > ' type invalid in ISO C
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:55: warning: bit-field 'mixed_enco=
 > ding' type invalid in ISO C
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:56: warning: bit-field 'encoding' =
 > type invalid in ISO C
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:59: warning: bit-field 'count' typ=
 > e invalid in ISO C
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:139: warning: ISO C90 does not sup=
 > port flexible array members
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:147: warning: ISO C90 does not sup=
 > port flexible array members
 > /usr/src/aj/cvs/gcc/gcc/unwind-dw2-fde.h:157: warning: pointer of type `voi=
 > d *' used in arithmetic
 > /usr/src/aj/cvs/gcc/gcc/crtstuff.c:209: warning: ISO C forbids empty initia=
 > lizer braces
 > 
 > Unfortunatly a simple:
 > crtbegin.o =3D -Wno-error
 > 
 > Does not help at all :-(.  So, white-listening does not seem to
 > work:-(
 > 
 > Can anybody help me, please?

Sorry, I think your approach is wrong.  You're adding strict warnings
(-pedantic) to target files which are only compiled by gcc and thus
should be able to use gcc-isms.  Then you're working on needlessly
fixing these warnings and/or also proposing adding -Wno-error to new
files which used to compile cleanly.

I think you should consider another approach.  I'm going to guess that
the new warnings from SYSCALLS.c are all of the "old-style"
declaration type?  If so, you may want to simply add
-Wno-old-style-declarations to the rule which compiles that file.
Should be a one line fix.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]