commit 79adecb0b52f58792a2a2f05394f3df13e2b7fcc
Author: Jason Merrill <jason@redhat.com>
Date: Sun May 22 16:29:27 2011 -0400
PR c++/47263
* decl.c (use_eh_spec_block): Do use an EH spec block for a
lambda op().
@@ -12759,7 +12759,7 @@ use_eh_spec_block (tree fn)
not creating the EH_SPEC_BLOCK we save a little memory,
and we avoid spurious warnings about unreachable
code. */
- && !DECL_ARTIFICIAL (fn));
+ && !DECL_DEFAULTED_FN (fn));
}
/* Store the parameter declarations into the current function declaration.
new file mode 100644
@@ -0,0 +1,16 @@
+// PR c++/47263
+// { dg-options -std=c++0x }
+// { dg-do run }
+
+#include <exception>
+
+int main( void )
+{
+ std::set_unexpected( []{ throw 0; } );
+ try
+ {
+ []() throw( int ) { throw nullptr; }();
+ }
+ catch( int )
+ { }
+}