[C++ PATCH] Make parser revert digraph "<:"

Gabriel Dos Reis gdr@integrable-solutions.net
Mon Jan 26 05:29:00 GMT 2004


Daniel Jacobowitz <drow@mvista.com> writes:

| Will we get the error for a literal "A[:0>" also?

The patch as provided will issue an error for that -- which isn't very
enlightening :-/  

|  I understand that
| that's not a meaningful construction, but the error message is still
| going to look really odd.
| 
| I'm guessing we have no way to find out at this late stage whether a
| digraph was encountered.

I think we can:  It would require cpplib telling the lexer whether
'<:' was spelt that way or '[' in the user codes.  Such things might be
actually useful for meaningful diagnostics, or if we were checking ODR
violations (something we don't currently do, but which might make sense
to do, either as part of export implementation or in a framework where
C++ programs have a different representation than bare .o files we
currently produce).

-- Gaby



More information about the Gcc-patches mailing list