This is the mail archive of the
mailing list for the GCC project.
Get rid of -trigraphs?
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: gcc at gcc dot gnu dot org
- Cc: Zack Weinberg <zack at codesourcery dot com>
- Date: Thu, 30 May 2002 07:07:18 +0100
- Subject: Get rid of -trigraphs?
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 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
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.