diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0323-PR-c-47263.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0323-PR-c-47263.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0323-PR-c-47263.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0323-PR-c-47263.patch new file mode 100644 index 0000000000..2983f8473e --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0323-PR-c-47263.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 83cedb74fbe2740877ae824da6ee339342eaddee Mon Sep 17 00:00:00 2001 | ||
2 | From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Wed, 25 May 2011 01:08:31 +0000 | ||
4 | Subject: [PATCH] PR c++/47263 | ||
5 | * decl.c (use_eh_spec_block): Do use an EH spec block for a | ||
6 | lambda op(). | ||
7 | |||
8 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174161 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
9 | |||
10 | index 108bb47..9e029d2 100644 | ||
11 | --- a/gcc/cp/decl.c | ||
12 | +++ b/gcc/cp/decl.c | ||
13 | @@ -12570,7 +12570,7 @@ use_eh_spec_block (tree fn) | ||
14 | not creating the EH_SPEC_BLOCK we save a little memory, | ||
15 | and we avoid spurious warnings about unreachable | ||
16 | code. */ | ||
17 | - && !DECL_ARTIFICIAL (fn)); | ||
18 | + && !DECL_DEFAULTED_FN (fn)); | ||
19 | } | ||
20 | |||
21 | /* Store the parameter declarations into the current function declaration. | ||
22 | new file mode 100644 | ||
23 | index 0000000..1490a25 | ||
24 | --- /dev/null | ||
25 | +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C | ||
26 | @@ -0,0 +1,16 @@ | ||
27 | +// PR c++/47263 | ||
28 | +// { dg-options -std=c++0x } | ||
29 | +// { dg-do run } | ||
30 | + | ||
31 | +#include <exception> | ||
32 | + | ||
33 | +int main( void ) | ||
34 | +{ | ||
35 | + std::set_unexpected( []{ throw 0; } ); | ||
36 | + try | ||
37 | + { | ||
38 | + []() throw( int ) { throw nullptr; }(); | ||
39 | + } | ||
40 | + catch( int ) | ||
41 | + { } | ||
42 | +} | ||
43 | -- | ||
44 | 1.7.0.4 | ||
45 | |||