Commit da4e26be by Jason Merrill Committed by Jason Merrill

parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note for noexcept…

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
parent f0f2f975
2014-06-04 Jason Merrill <jason@redhat.com>
* 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.
......
......@@ -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 %<constexpr%> only available with "
"-std=c++11 or -std=gnu++11");
else if (cxx_dialect < cxx11 && id == ridpointers[(int)RID_NOEXCEPT])
inform (location, "C++11 %<noexcept%> 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 %<thread_local%> only available with "
"-std=c++11 or -std=gnu++11");
else if (processing_template_decl && current_class_type
&& TYPE_BINFO (current_class_type))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment