* decl.c (use_eh_spec_block): Do use an EH spec block for a
lambda op().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174161
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-05-24 Jason Merrill <jason@redhat.com>
+ PR c++/47263
+ * decl.c (use_eh_spec_block): Do use an EH spec block for a
+ lambda op().
+
PR c++/47336
* error.c (dump_template_bindings): Suppress access control.
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.
2011-05-24 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/lambda/lambda-eh2.C: New.
+
* g++.dg/cpp0x/error3.C: New.
* g++.dg/cpp0x/defaulted27.C: New.
--- /dev/null
+// 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 )
+ { }
+}