===================================================================
@@ -0,0 +1,4 @@
+// PR c++/50309
+// { dg-options -std=c++0x }
+
+void foo () noexcept () { } // { dg-error "expected" }
===================================================================
@@ -9049,6 +9049,10 @@ grokdeclarator (const cp_declarator *declarator,
virt_specifiers = declarator->u.function.virt_specifiers;
/* Pick up the exception specifications. */
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
closest to the identifier. */