RFC: should we use -Werror? (& sample patch to do it)
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Sep 5 12:52:00 GMT 2001
> From: Zack Weinberg <zack@codesourcery.com>
>
> On Wed, Sep 05, 2001 at 03:09:04PM -0400, Kaveh R. Ghazi wrote:
> > >
> > > Not true. -Werror turns _all_ warnings into errors.
> > > zw
> >
> > Hmm, I tested it in 3.1 and 2.95.3 and you're right. Well, that
> > certainly puts a monkey wrench into my plan.
> >
> > Since these are intractable as you say, what if we applied the
> > __extension__ keyword to these strings? Since they are from -pedantic
> > that would eliminate the warning, and thus the hard error when using
> > -Werror, right?
>
> No, the error issues from the tokenizer, which doesn't know anything
> about __extension__, nor should it (it would have to understand the
> expression grammar then).
Er, I just tried it and it works...
> 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?
> zw
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.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc
mailing list