aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2009-04-22 15:32:18 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2009-04-22 15:32:18 +0000
commitcfc935327585254eabd5c18f298b1b4bc28a2b02 (patch)
tree51e37b610f5f0eae957aa2a3cee06eec9ab65abb /gcc/cp
parent8632d02a43457ecbcef85175e7575e5da6784646 (diff)
downloadgcc-cfc935327585254eabd5c18f298b1b4bc28a2b02.zip
gcc-cfc935327585254eabd5c18f298b1b4bc28a2b02.tar.gz
gcc-cfc935327585254eabd5c18f298b1b4bc28a2b02.tar.bz2
re PR c++/14875 (When using 'or' keyword, the error message speaks of a '||' token)
2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/14875 * c-common.c (c_parse_error): Take a token_flags parameter. Use token_type for the token type instead. Pass token_flags to cpp_type2name. * c-common.h (c_parse_error): Update declaration. * c-parser.c (c_parser_error): Pass 0 as token flags. libcpp/ * lex.c (cpp_type2name): Take a flags parameter. Call cpp_named_operator2name for named operators and cpp_digraph2name for digraphs. (cpp_digraph2name): New. (cpp_spell_token): Use it. (cpp_output_token): Likewise. * include/cpplib.h (cpp_type2name): Update declaration. * init.c (cpp_named_operator2name): New. * internal.h (cpp_named_operator2name): Declare. cp/ * parser.c (cp_parser_error): Pass token->flags to c_parse_error. testsuite/ * g++.dg/parse/parser-pr14875.C: New. * g++.dg/parse/parser-pr14875-2.C: New. * g++.dg/parse/error6.C: Update match string. From-SVN: r146589
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 99c7826..1b67ad8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR c++/14875
+ * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
+
2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/35711
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index b6b8bf5..fbf211b 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -2091,7 +2091,7 @@ cp_parser_error (cp_parser* parser, const char* message)
CPP_KEYWORD, keywords are treated like
identifiers. */
(token->type == CPP_KEYWORD ? CPP_NAME : token->type),
- token->u.value);
+ token->u.value, token->flags);
}
}