Subject: Re: Fix for PR#23300 (cpp and -Wtraditional)
To: Christos Zoulas <christos@zoulas.com>
From: James Chacon <jmc@NetBSD.org>
List: tech-toolchain
Date: 12/15/2003 22:44:46
On Tue, Dec 16, 2003 at 12:39:39AM +0000, Christos Zoulas wrote:
> In article <20031216000832.GA19158@netbsd.org>,
> James Chacon <jmc@NetBSD.org> wrote:
> >
> >By doing so, that changes the behavior for traditional cpp and almost
> >99% likely breaks the expectation of the use of #error in that case. In
> >other words, the warning is useless at best here for #error specifically
> >and actually damaging more than likely.
> >
> >James
> 
> Why, it just move a cpp time error to a compile time error?

Actually no...If you follow this warning's advice and then compile something
with -traditional-cpp you'll lose. Where you expected something to error out,
will not, and instead give unexpected results. When in the past all
pre C89 cpp's I used would have error'd on #error (maybe not with a nice
'error' string, but they stopped regardless). This one is special exactly
for being named 'error'. That's what it was used for both pre and post C89
and the warning tell you to turn one behavior off when that's obviously not 
what was intended by whoever wrote the original code it's parsing..

James