This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/10613: Please make -Wtrigraphs the default
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 4 May 2003 21:36:00 -0000
- Subject: Re: preprocessor/10613: Please make -Wtrigraphs the default
- Reply-to: Neil Booth <neil at daikokuya dot co dot uk>
The following reply was made to PR preprocessor/10613; it has been noted by GNATS.
From: Neil Booth <neil@daikokuya.co.uk>
To: Zack Weinberg <zack@codesourcery.com>
Cc: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>, gcc-gnats@gcc.gnu.org,
gcc-patches@gcc.gnu.org
Subject: Re: preprocessor/10613: Please make -Wtrigraphs the default
Date: Sun, 4 May 2003 22:33:20 +0100
Zack Weinberg wrote:-
> > This option is in effect unless trigraphs are turned on, and is
> > implied by @option{-Wall}. With the exception of a trigraph that
> > would form an escaped newline, warnings are not given for trigraphs
> > within comments as they do not affect the meaning of the program.
>
> is confusing. I would say instead
>
> Most trigraphs in comments cannot affect the meaning of the program.
> However, a trigraph that would form an escaped newline (@samp{??/}
> at the end of a line) can, by changing where the comment begins or
> ends. Therefore, only trigraphs that would form escaped newlines
> produce warnings inside a comment.
>
> This option is implied by @option{-Wall}. If @option{-Wall} is not
> given, this option is still enabled unless trigraphs are enabled.
> To get trigraph conversion without warnings, but get the other
> @option{-Wall} warnings, use @samp{-trigraphs -Wall -Wno-trigraphs}.
That's great, thanks, I'll plagiarise in full.
Neil.