diff options
author | Kai Tietz <ktietz@redhat.com> | 2014-12-10 12:29:22 +0100 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2014-12-10 12:29:22 +0100 |
commit | e6f2df09a50cbc7e47260c616c0047aac472b342 (patch) | |
tree | dbe73bd2be6724a5e251813c2c299fec90d6ceef | |
parent | 6cc92f7d80b696290da0df8625c49c60353debf9 (diff) | |
download | gcc-e6f2df09a50cbc7e47260c616c0047aac472b342.zip gcc-e6f2df09a50cbc7e47260c616c0047aac472b342.tar.gz gcc-e6f2df09a50cbc7e47260c616c0047aac472b342.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/parser.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a3d8d99..c8a66b0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2014-12-10 Kai Tietz <ktietz@redhat.com> + 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 7bd9477..48dd64a 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 %<noexcept%> 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 %<thread_local%> only available with " "-std=c++11 or -std=gnu++11"); |