This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning for trigraphs in comment?
Paul Koning <pkoning@equallogic.com> writes:
| >>>>> "Zack" == Zack Weinberg <zack@codesourcery.com> writes:
|
| Zack> Paul Koning <pkoning@equallogic.com> writes:
| >>>>>>> "Gabriel" == Gabriel Dos Reis <gdr@integrable-solutions.net>
| >>>>>>> writes:
| >> >> The patch is not appropriate for 3.3. >> The real fix is to
| >> remove trigraphs from the standard.
| >>
| Gabriel> Oh, I'm all for removing trigraphs, digraphs, quadrigraphs
| Gabriel> and whatevergraphs -- I've also thought they were mistakes.
| Gabriel> But, in fact, I'm skeptical that would ever happen.
| >> I like the notion too. Trigraphs are an utter misfeature.
| >>
| >> Would it make sense to have the lexer ignore trigraphs (i.e., just
| >> treat ??/ as three characters) unless specifically enabled with
| >> -fenable-trigraphs? In the unlikely case that anyone actually
| >> uses trigraphs, this would enable them to continue doing so.
|
| Zack> GCC has done this for decades. See the documentation of the
| Zack> -trigraphs option.
|
| Oh. So it looks like what's needed is to have -ansi NOT imply
| -trigraphs.
I'm not sure we are talking about the same thing.
What is happening with current GCC in production use is that GCC
choosed NOT to warn for trigraphs in comment even if -Wtrigraph.
-- Gaby