Commit 30239565 by Paolo Carlini Committed by Paolo Carlini

re PR c++/50309 ([C++0x] ICE: tree check: expected tree_list, have error_mark in…

re PR c++/50309 ([C++0x] ICE: tree check: expected tree_list, have error_mark in comp_except_specs, at cp/typeck.c:1014 on empty noexcept)

/cp
2011-09-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50309
	* decl.c (grokdeclarator): Check u.function.exception_specification
	for error_mark_node.

/testsuite
2011-09-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50309
	* g++.dg/cpp0x/noexcept14.C: New.

From-SVN: r178654
parent e39438c5
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* decl.c (grokdeclarator): Check u.function.exception_specification
for error_mark_node.
2011-09-07 Jason Merrill <jason@redhat.com> 2011-09-07 Jason Merrill <jason@redhat.com>
PR c++/50298 PR c++/50298
......
...@@ -9049,6 +9049,10 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -9049,6 +9049,10 @@ grokdeclarator (const cp_declarator *declarator,
virt_specifiers = declarator->u.function.virt_specifiers; virt_specifiers = declarator->u.function.virt_specifiers;
/* Pick up the exception specifications. */ /* Pick up the exception specifications. */
raises = declarator->u.function.exception_specification; raises = declarator->u.function.exception_specification;
/* If the exception-specification is ill-formed, let's pretend
there wasn't one. */
if (raises == error_mark_node)
raises = NULL_TREE;
/* Say it's a definition only for the CALL_EXPR /* Say it's a definition only for the CALL_EXPR
closest to the identifier. */ closest to the identifier. */
......
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309
* g++.dg/cpp0x/noexcept14.C: New.
2011-09-07 Jason Merrill <jason@redhat.com> 2011-09-07 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/constexpr-ref3.C: New. * g++.dg/cpp0x/constexpr-ref3.C: New.
...@@ -5,9 +10,9 @@ ...@@ -5,9 +10,9 @@
* g++.dg/cpp0x/sfinae11.C: Check for explanatory diagnostic. * g++.dg/cpp0x/sfinae11.C: Check for explanatory diagnostic.
2011-09-07 Georg-Johann Lay <avr@gjlay.de> 2011-09-07 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/section1.c: Don't xfail for avr. * gcc.dg/section1.c: Don't xfail for avr.
2011-09-07 Georg-Johann Lay <avr@gjlay.de> 2011-09-07 Georg-Johann Lay <avr@gjlay.de>
PR tree-optimization/50322 PR tree-optimization/50322
......
// PR c++/50309
// { dg-options -std=c++0x }
void foo () noexcept () { } // { dg-error "expected" }
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