This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trigraph warnings when compiling linux-2.4.0-prerelease1

Linus Torvalds <> 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

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]