This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] trigraphs
On 21-Jul-2003, Matt Austern <austern@apple.com> wrote:
> On Monday, July 21, 2003, at 12:01PM, Jason Merrill wrote:
> I agree that turning off the warning unconditionally is a bad idea. The real
> question is whether the warning should be turned on by -Wall or only if the
> user explicitly uses -Wtrigraphs.
>
> I claim that the latter makes more sense. -Wall is supposed to be a
> collection of warnings that are appropriate for most users: the idea is
> that, in general, "good" code should compile clean under -Wall.
>
> This doesn't apply to -Wtrigraphs. The vast majority of users have no reason
> to care about trigraphs. They are never going to use the -trigraphs
> flag and have no reason to care what would happen in -trigraphs mode.
These users (or their colleagues) may well attempt to compile their
code with some other C compiler which has trigraphs enabled by default.
If they do so, the code may suddenly change in meaning, resulting in
a portability problem.
Constructs which are likely to cause portability problems (and which are
easy to avoid) should be warned about with -Wall. So I think -Wtrigraphs
should be part of -Wall.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.