From: Kai Tietz Date: Wed, 10 Dec 2014 11:29:22 +0000 (+0100) Subject: re PR c++/64127 (ICE on invalid: tree check: expected identifier_node, have template_... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6f2df09a50cbc7e47260c616c0047aac472b342;p=gcc.git re PR c++/64127 (ICE on invalid: tree check: expected identifier_node, have template_id_expr in cp_parser_diagnose_invalid_type_name, at cp/parser.c:2980) PR c++/64127 * parser.c (cp_parser_diagnose_invalid_type_name): Check id for being an identifier before accessing it. From-SVN: r218573 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a3d8d995853..c8a66b0de16 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2014-12-10 Kai Tietz + PR c++/64127 + * parser.c (cp_parser_diagnose_invalid_type_name): Check id + for being an identifier before accessing it. + PR c++/64100 * typeck.c (lookup_destructor): Handle incomplete type. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 7bd9477a4e4..48dd64a4c17 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2977,6 +2977,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, inform (location, "C++11 % only available with " "-std=c++11 or -std=gnu++11"); else if (cxx_dialect < cxx11 + && TREE_CODE (id) == IDENTIFIER_NODE && !strcmp (IDENTIFIER_POINTER (id), "thread_local")) inform (location, "C++11 % only available with " "-std=c++11 or -std=gnu++11");