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]
Other format: [Raw text]

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 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.



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