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...

 > Looking at the commandline, I wonder why we do not pass -Werror to
 > this?  I'll send a patch for the actual warning later but would
 > welcome if somebody fixes the Makefiles to actually use -Werror
 > here.  Or is this on purpose?
 > Andreas

Yes, at the time I added -Werror I did that on purpose.  There was a
lot of resistance to adding that flag and I felt I was personally
being asked to fix any and all errors that resulted.  So I only
activated it on "host" and "build" files, because those are easier to
build in a cross compiler and I could preemptively fix a lot of the
problems myself.  To trigger "target" file warnings, i.e. to build
libgcc.a in a cross-compiler, you also have to build binutils and have
the appropriate headers for each target.  I didn't have the time to do
that for all targets (or even just one on each cpu) and preemptively
fix those warnings.  So I took things as far as I could.

Since then there seems to be more acceptance of -Werror, and it may be
that we can count on the community at large to fix their own warnings
on their respective targets.  So there's no reason we can't use
-Werror on target files too.  It's just a matter of someone
volunteering to champion it and fix some of the most common problems.
(I don't have the time myself to be point person.)  There will
undoubtedly be some naysayers, but I think the feasibility of using
-Werror so far has been self-evident.

If you are interested I would encourage you to proceed.  I'll pitch in
as time permits and back you up if you decide to give it a go.

Kaveh R. Ghazi

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