From: Jason Merrill Date: Thu, 5 Jun 2014 17:30:57 +0000 (-0400) Subject: parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note for noexcept and... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da4e26be993775444e460edd68c88a1ae6a6a16e;p=gcc.git parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note for noexcept and thread_local, too. * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note for noexcept and thread_local, too. From-SVN: r211285 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e9ea46d7d90..1248ea12fbe 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-06-04 Jason Merrill + * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note + for noexcept and thread_local, too. + PR c++/61343 * decl.c (check_initializer): Maybe clear DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 60e6cda98a4..7d574d0d3f1 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2920,6 +2920,13 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_CONSTEXPR]) inform (location, "C++11 % only available with " "-std=c++11 or -std=gnu++11"); + else if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_NOEXCEPT]) + inform (location, "C++11 % only available with " + "-std=c++11 or -std=gnu++11"); + else if (cxx_dialect < cxx11 + && !strcmp (IDENTIFIER_POINTER (id), "thread_local")) + inform (location, "C++11 % only available with " + "-std=c++11 or -std=gnu++11"); else if (processing_template_decl && current_class_type && TYPE_BINFO (current_class_type)) {