This is the mail archive of the gcc-patches@gcc.gnu.org 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]

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


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> Daniel Jacobowitz <drow@mvista.com> writes:
> | 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.

This information is available via the DIGRAPH flag on tokens returned
by cpp_get_token, but I do not know if it is preserved all the way
through to this point in the C++ parser.

As with the case "foo <: : whatever", written that way in the source
code, it seems to me that this is not a mistake that anyone would
actually make, therefore I do not think it merits exception-to-
the-exception special treatment.

zw


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