Commit 86d822aa by Jason Merrill Committed by Jason Merrill

re PR c++/47263 ([C++0x] lambda + dynamic-exception-specification std::unexpected() is not called.)

	PR c++/47263
	* decl.c (use_eh_spec_block): Do use an EH spec block for a
	lambda op().

From-SVN: r174076
parent dbee8bb3
2011-05-23 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++/49058
* call.c (splice_viable): Be strict in templates.
......
......@@ -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.
......
2011-05-23 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/lambda/lambda-eh2.C: New.
* g++.dg/cpp0x/sfinae24.C: New.
* g++.dg/cpp0x/error3.C: New.
......
// 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 )
{ }
}
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