This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Question on -Werror usage in Makefiles...
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: aj at suse dot de
- Cc: gcc-patches at gcc dot gnu dot org, zack at codesourcery dot com
- Date: Sat, 1 Nov 2003 20:25:23 -0500 (EST)
- Subject: Re: Question on -Werror usage in Makefiles...
- References: <u84qxwqhnk.fsf@gromit.moeb> <200310261407.h9QE7CHx013098@caip.rutgers.edu> <u8u15wyrhm.fsf@gromit.moeb> <200310261617.h9QGHLUL009883@caip.rutgers.edu> <u8r810x8e2.fsf@gromit.moeb> <871xszj38t.fsf@egil.codesourcery.com> <u8n0bnyj1r.fsf@gromit.moeb> <u8u15rzslg.fsf@gromit.moeb> <87brrzlnnu.fsf@egil.codesourcery.com> <u8fzhbxlhm.fsf@gromit.moeb> <874qxqjs5p.fsf@egil.codesourcery.com> <hohe1pr4pf.fsf@reger.suse.de> <87d6cd8im5.fsf@egil.codesourcery.com> <u84qxp6snj.fsf@gromit.moeb> <87oevxgjwz.fsf@codesourcery.com> <200311010223.hA12N1VQ005681@caip.rutgers.edu> <u83cd810t5.fsf@gromit.moeb> <u8y8v0ynms.fsf@gromit.moeb> <u8oevwyn1w.fsf@gromit.moeb> <u8he1oymma.fsf@gromit.moeb>
> 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