warning: trigraph ... ignored - again
H. Peter Anvin
hpa@transmeta.com
Fri Jun 16 16:34:00 GMT 2000
Joe Buck wrote:
>
> Peter Anvin writes:
> > I think you seriously need to re-think your design. You have broken old
> > behaviour and bundled a low-priority warning with a high-priority
> > warning that can't be switched on or off as a group. I think that's a
> > major lose.
>
> How so? Once Zack fixes things so that there are no warnings about
> trigraphs in comments, then the only way you'll see a warning is if
> you have a trigraph in the actual source code, and this trigraph changes
> the meaning of the program. Not alerting the user to such a condition
> when the user has said "-Wall" would be wrong. It is not a low-priority
> warning at all. And the warning you are currently seeing for the
> trigraph in the comment will disappear.
>
It doesn't change the meaning of the program, because I have, very
explicitly, turned the abominations called trigraphs *OFF*. I don't
care one bit if it never compiles with a non-gcc compiler ever again,
because it has 2^n other gcc extensions to the language.
Thus, warning about an ignored trigraph is just a nuisance warning.
However, if someone ever went ahead and put in -ansi (which implies
-trigraph) in the Makefile without knowing this, I would want it to
issue some pretty stern warnings about the trigraphs now being
recognized.
I don't care what you include in -Wall, but I don't want these two, very
different, warnings to be bundled together. Split it into -Wtrigraphs
and -Wignored-trigraphs or something... that way I can do
-Wall -Wno-trigraphs-ignored
It would also be nice, again, to have a -no-trigraphs option as the
contrapositive to -trigraphs. gcc is usually very good about providing
on and off switches for all options (except, perhaps, bulk options like
-ansi); this one is an unfortunate exception.
-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
More information about the Gcc
mailing list