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]

Re: RFC: should we use -Werror? (& sample patch to do it)

On Wed, Sep 05, 2001 at 03:51:59PM -0400, Kaveh R. Ghazi wrote:
>  > These are not warnings we want to ignore, either.  Those strings
>  > really are too long to be safe.
>  > Please, can we stop trying to paper over the problems and _fix_ them?
> Well that's a separate question.  I don't know of any way short of
> rewriting the whole specs stuff that Neil was suggesting.  I'm not
> generally in favor of papering over things, but at the same time I
> don't think -Werror should necessarily bottleneck on a specs
> implementation rewrite if a simple workaround is available and the
> long term solution is on someone else's todo list.

You and I seem to be coming at this from different angles.  I am not
yet convinced that -Werror is actually a good idea, even if we *did*
have zero warnings across all targets, which we don't.  I would like
to discuss how we can get to zero warnings, instead of how we should
enforce its staying that way once we do get there.

The reason I'm not convinced that -Werror would be a good idea even
after we get to zero warnings, is that the existing set of warnings
have been around for a very long time because they're both harmless
and intractable.  (Harmless, in the sense that I am fairly sure the
code is in all cases correct, just pulling dubious tricks.)  I feel
it's likely that, even if we do solve all of them, we will get more
code in the same category - causes harmless, intractable warnings -
and then there will be much finger-pointing and raging and gnashing
of teeth, should we enforce zero warnings with -Werror.

I'd like to make a comparison to the argument we had over whether
patches that exposed bugs elsewhere, should be reverted.  All the
warnings in combine.c happen because someone decided mode_bitsize
should be unsigned.  They were probably right.  With -Werror, the
patch that made it unsigned would have broken bootstrap, and then
we would have had an endless unproductive flamewar about it.


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