This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Trigraph warnings when compiling linux-2.4.0-prerelease1
Linus Torvalds <torvalds@transmeta.com> writes:
> -Wtrigraphs
> Warn if any trigraphs are encountered (assuming they are enabled).
>
> which certainly implies to me that even if you enabled "-Wtrigraphs", it
> wouldn't even't cause a warning if trigraphs aren't enabled (and again,
> it's documented that they are enabled by "-ansi" and by "-trigraphs" and
> disabled by default).
That is not my reading of the documentation, nor I think what it
intended to say. It clearly is silly that -Wtrigraphs would have no
effect if trigraphs are disabled - you might still want the warning to
catch cases of unintended trigraphs being miscompiled by other
compilers.
I read "assuming they are enabled" is a very poor way of saying "warn about
constructs that would be read as trigraphs if trigraphs were enabled."
(This question is of course separate from whether -Wtrigraphs should be
on by default or implied other switches like -Wall. I think -Wtrigraphs
should definitely be implied by -Wall, though probably not default.)
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/