cpplib: Warning for multiline strings in directives

Zack Weinberg zack@wolery.cumb.org
Sun Aug 20 10:31:00 GMT 2000


On Sun, Aug 20, 2000 at 10:06:44AM +0100, Neil Booth wrote:
> Zack Weinberg wrote:-
> 
> > Yes, but I don't think it's worth a mandatory warning, and it will
> > come up in system headers.  I'd rather you added a -Wdeprecated which
> > is suppressed in system headers, turned it on with -Wall, and made
> > this conditional on that.  (And all other warnings about deprecated
> > extensions.)
> 
> OK, I may look into this.  I think another diagnostic category, say
> DEPRECATED, should be added in this case.

Yah.

> Incidentally, every time we issue warnings or pedantic warnings, the
> caller checks if we're in a system header and skips the diagnostic if
> we are.  Similarly checking for CPP_PENDATIC.  This scattering of the
> checking has meant we've forgotten to do it in the past.  Do you think
> this is better cleaned up and done in one place in cpperror.c, maybe
> _cpp_begin_message?

That might be a good idea.  Wherever we check for inhibit_warnings is
probably the right place.

It's been suggested that we suppress *all* warnings in system headers,
on the grounds that the user can't do anything about them.  If you do
this patch, you might as well implement that, and an option to
override the special treatment (-Win-system-headers?)

zw


More information about the Gcc-patches mailing list