Warning for trigraphs in comment?

Zack Weinberg zack@codesourcery.com
Mon May 19 14:35:00 GMT 2003


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.

GCC has done this for decades.  See the documentation of the
-trigraphs option.

zw



More information about the Gcc mailing list