This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Get rid of -trigraphs?
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: gcc at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: Thu, 30 May 2002 02:31:50 -0400
- Subject: Re: Get rid of -trigraphs?
Metrowerks' compilers implement trigraphs but are not on by default and
there is an option to turn them on.
I would say keep trigraphs because someone somewhere will be using
source code that have trigraphs because it is part of ISO C standard.
Thanks,
Andrew Pinski
On Thursday, May 30, 2002, at 02:07 , Neil Booth wrote:
> I'm seriously considering getting rid of the -trigraphs option.
>
> I believe this was mainly added to cccp as an optimization, though
> possibly a political statement as well, because cccp did a separate
> trigraph conversion pass on the whole file which could be skipped if
> we weren't going to honour them. There is no longer any separate pass,
> so there is nothing to gain any more. There is only added complexity.
>
> Since trigraphs make no sense in C or assembler code, the only thing
> that could be affected by such a change is string literals. Very few
> serious string literals (probably just messages) would have trigraphs
> in anyway, and can be fixed by judicious insertion of a '\' between the
> '?'s. In my experience, other compilers that implement trigraphs have
> them on by default, and I don't think you can turn them off (e.g. EDG
> and MSVC++), so most code has a good chance of being trigraph-clean.
> And I've heard complaints on Usenet about GCC not having them on
> by default.
>
> By a similar argument I'd like to get rid of -Wtrigraphs too; this
> is in fact a bigger win though I don't feel I'm on as strong ground
> requesting this.
>
> Desire to get rid of this stuff comes from an attempt I made about
> two months ago to change the lexing code; and -trigraphs, and
> -Wtrigraphs in particular, were getting in the way.
>
> Thoughts?
>
> Neil.
>
>