]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/64127
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Dec 2014 11:29:22 +0000 (11:29 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Dec 2014 11:29:22 +0000 (11:29 +0000)
* parser.c (cp_parser_diagnose_invalid_type_name): Check id
for being an identifier before accessing it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218573 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/parser.c

index a3d8d995853b92932f0c39877ff7fbc9d050c49c..c8a66b0de169233760411658ada908a5cdee09d9 100644 (file)
@@ -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.
 
index 7bd9477a4e48234209b6f2f6afa825439b8e6714..48dd64a4c1703e5d62cec0e7ff21f2e1e1380943 100644 (file)
@@ -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");