------- Comment #13 from manu at gcc dot gnu dot org 2009-04-22 15:32 ------- Subject: Bug 14875
Author: manu Date: Wed Apr 22 15:32:18 2009 New Revision: 146589 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146589 Log: 2009-04-22 Manuel Lopez-Ibanez <m...@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. Added: trunk/gcc/testsuite/g++.dg/parse/parser-pr14875-2.C trunk/gcc/testsuite/g++.dg/parse/parser-pr14875.C Modified: trunk/gcc/ChangeLog trunk/gcc/c-common.c trunk/gcc/c-common.h trunk/gcc/c-parser.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/parse/error6.C trunk/libcpp/ChangeLog trunk/libcpp/include/cpplib.h trunk/libcpp/init.c trunk/libcpp/internal.h trunk/libcpp/lex.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14875