This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14875] When using 'or' keyword, the error message speaks of a '||' token
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2007 02:41:36 -0000
- Subject: [Bug c++/14875] When using 'or' keyword, the error message speaks of a '||' token
- References: <bug-14875-8295@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from manu at gcc dot gnu dot org 2007-01-28 02:41 -------
(In reply to comment #7)
> I seem to recall that when Giovanni worked on these digraph thingies,
> it was pointed out that our CPP is able to mark a pp-token whether it
> is a digraph or not.
>
Actually, it is marked as token->flags & NAMED_OP. This can be easily tested.
However, the way the C++ front-end handles parser errors makes that totally
useless. Once we reach c-common.c (c_parse_error), the actual cp_token is lost
and we only keep the type. Also, it seems that it should be using
cpp_token_as_text rather than cpp_type2name. However, the change does not seem
trivial at all.
Unless someone decides to fix the whole C++ parser error handling, this and PR
28152 won't be fixed.
Any brave volunteer?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14875