diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-30 12:37:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 12:26:41 +0100 |
commit | 478deec11f3349d61b1a922f047dc958dc07262a (patch) | |
tree | 1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch | |
parent | d42dccf886983ba14ccc868041d7bea0cf1a260e (diff) | |
download | poky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz |
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on
FSF gcc-4_2-branch since 4.6.0 was released
They will roll into 4.6.1 release once that
happens in coming approx 6 months time then
we can simply remove them thats the reason
so use a separate .inc file to define the
SRC_URI additions
(From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch new file mode 100644 index 0000000000..ab6c28dac1 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0089-PR-c-48468.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 4215154488607abf1ee95f1d1f03cb66be4bd4d8 Mon Sep 17 00:00:00 2001 | ||
2 | From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Fri, 8 Apr 2011 15:02:16 +0000 | ||
4 | Subject: [PATCH 089/200] PR c++/48468 | ||
5 | * except.c (build_noexcept_spec): Propagate error_mark_node. | ||
6 | (finish_noexcept_expr): Likewise. | ||
7 | |||
8 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172194 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
9 | |||
10 | index a814d67..874f111 100644 | ||
11 | --- a/gcc/cp/except.c | ||
12 | +++ b/gcc/cp/except.c | ||
13 | @@ -1125,6 +1125,9 @@ finish_noexcept_expr (tree expr, tsubst_flags_t complain) | ||
14 | { | ||
15 | tree fn; | ||
16 | |||
17 | + if (expr == error_mark_node) | ||
18 | + return error_mark_node; | ||
19 | + | ||
20 | if (processing_template_decl) | ||
21 | return build_min (NOEXCEPT_EXPR, boolean_type_node, expr); | ||
22 | |||
23 | @@ -1212,6 +1215,8 @@ build_noexcept_spec (tree expr, int complain) | ||
24 | return noexcept_true_spec; | ||
25 | else if (expr == boolean_false_node) | ||
26 | return noexcept_false_spec; | ||
27 | + else if (expr == error_mark_node) | ||
28 | + return error_mark_node; | ||
29 | else | ||
30 | { | ||
31 | gcc_assert (processing_template_decl || expr == error_mark_node); | ||
32 | index be6fa00..60015e7 100644 | ||
33 | --- a/gcc/testsuite/g++.dg/cpp0x/noexcept02.C | ||
34 | +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept02.C | ||
35 | @@ -46,7 +46,9 @@ SA(!noexcept(f3(A()))); | ||
36 | template <class T1, class T2> | ||
37 | void f (T1, T2) noexcept(noexcept(T1(), T2())); | ||
38 | |||
39 | -SA(noexcept(f3(1,1))); | ||
40 | +struct B { }; | ||
41 | + | ||
42 | +SA(noexcept(f3(1,B()))); | ||
43 | SA(!noexcept(f3(1,A()))); | ||
44 | SA(!noexcept(f3(A(),1))); | ||
45 | SA(!noexcept(f3(A(),A()))); | ||
46 | diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae11.C b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C | ||
47 | new file mode 100644 | ||
48 | index 0000000..a3ffc34 | ||
49 | --- /dev/null | ||
50 | +++ b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C | ||
51 | @@ -0,0 +1,56 @@ | ||
52 | +// PR c++/48468 | ||
53 | +// { dg-options -std=c++0x } | ||
54 | +// { dg-prune-output "note" } | ||
55 | + | ||
56 | +template<class T> | ||
57 | +T&& declval() noexcept; | ||
58 | + | ||
59 | +template< class T > | ||
60 | +inline void f1( T& x ) noexcept( noexcept( declval<T&>().foo() ) ) | ||
61 | +{ | ||
62 | + x.foo(); | ||
63 | +} | ||
64 | + | ||
65 | +template< class T, | ||
66 | + bool Noexcept = noexcept( declval<T&>().foo() ) | ||
67 | +> | ||
68 | +inline void f2( T& x ) noexcept( Noexcept ) | ||
69 | +{ | ||
70 | + x.foo(); | ||
71 | +} | ||
72 | + | ||
73 | +// a common and trivial mistake | ||
74 | +template< class T > | ||
75 | +inline void f3( T& x ) noexcept( declval<T&>().foo() ) | ||
76 | +{ | ||
77 | + x.foo(); | ||
78 | +} | ||
79 | + | ||
80 | +struct X | ||
81 | +{ | ||
82 | + void foo(); | ||
83 | +}; | ||
84 | + | ||
85 | +struct Y | ||
86 | +{ | ||
87 | + void foo() noexcept; | ||
88 | +}; | ||
89 | + | ||
90 | +struct Z {}; | ||
91 | + | ||
92 | +int main() | ||
93 | +{ | ||
94 | + X x; Y y; Z z; | ||
95 | + | ||
96 | + static_assert( !noexcept( f1(x) ), "OK." ); | ||
97 | + static_assert( !noexcept( f2(x) ), "OK." ); | ||
98 | + // static_assert( !noexcept( f3(x) ), "shall be ill-formed(OK)." ); | ||
99 | + | ||
100 | + static_assert( noexcept( f1(y) ), "OK." ); | ||
101 | + static_assert( noexcept( f2(y) ), "OK." ); | ||
102 | + // static_assert( noexcept( f3(y) ), "shall be ill-formed(OK)." ); | ||
103 | + | ||
104 | + static_assert( noexcept( f1(z) ), "shall be ill-formed." ); // { dg-error "no match" } | ||
105 | + static_assert( noexcept( f2(z) ), "shall be ill-formed." ); // { dg-error "no match" } | ||
106 | + static_assert( !noexcept( f3(z) ), "shall be ill-formed." ); // { dg-error "no match" } | ||
107 | +} | ||
108 | -- | ||
109 | 1.7.0.4 | ||
110 | |||