This is the mail archive of the 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 <>
 > "Kaveh R. Ghazi" <> writes:
 > > 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.
 > It is - I send it previously.  But I was surprised that the
 > warn=-Wno-error black-listing does not work...

Let's ignore the black-listing trick for now on that file, it doesn't
seem to work and the Makefile is ugly enough.  Stick with the Makefile
rule instead.

Ah, I see now that you did try adding something to the rule - except
you added -Wno-error.  That'll stop it from erroring, but you'll still
get a gillion lines of (IMO useless) warning diagnostics.

On solaris2, the only warnings are "function declaration isn't a
prototype".  So you should only need to add -Wno-strict-prototypes.
The file is just a horking big set of system prototypes, and there are
some for which we don't know (or can't guarantee) the arguments, so I
feel that disabling that warning is the correct approach.

Kaveh R. Ghazi

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