summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-17 17:11:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-23 11:50:07 +0100
commit0faa5f72999fea82fadda8bab70abea2303216c7 (patch)
tree05a8c18d2f67d883f94d2bd6f060ab0f4ac7f156 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch
parentc2007ba4cdb64fa9e308d3dae395c03ef4cc9161 (diff)
downloadpoky-0faa5f72999fea82fadda8bab70abea2303216c7.tar.gz
gcc-4.6: Switch to using svn SRC_URI for recipe
We call the recipes 4.6 Remove the backport patches (From OE-Core rev: 68b545f4ff719f2b6e57d68b002dc9845c7a14ae) 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/0034-PR-c-48296.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch102
1 files changed, 0 insertions, 102 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch
deleted file mode 100644
index 5ad3ff7bf8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0034-PR-c-48296.patch
+++ /dev/null
@@ -1,102 +0,0 @@
1From d67703129d516043d4e43bdf79a17889f5abc3f7 Mon Sep 17 00:00:00 2001
2From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 29 Mar 2011 14:26:33 +0000
4Subject: [PATCH] PR c++/48296
5 * decl.c (cp_finish_decl): Defer validation of constexpr member
6 functions.
7 * class.c (finalize_literal_type_property): Validate them here.
8 * semantics.c (is_valid_constexpr_fn): Don't check completeness.
9
10git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171675 138bc75d-0d04-0410-961f-82ee72b054a4
11
12index 1325260..42066c3 100644
13--- a/gcc/cp/class.c
14+++ b/gcc/cp/class.c
15@@ -4547,6 +4547,8 @@ type_requires_array_cookie (tree type)
16 static void
17 finalize_literal_type_property (tree t)
18 {
19+ tree fn;
20+
21 if (cxx_dialect < cxx0x
22 || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
23 /* FIXME These constraints seem unnecessary; remove from standard.
24@@ -4557,18 +4559,10 @@ finalize_literal_type_property (tree t)
25 && !TYPE_HAS_CONSTEXPR_CTOR (t))
26 CLASSTYPE_LITERAL_P (t) = false;
27
28- if (!CLASSTYPE_LITERAL_P (t) && !CLASSTYPE_TEMPLATE_INSTANTIATION (t))
29- {
30- tree fn;
31- for (fn = TYPE_METHODS (t); fn; fn = DECL_CHAIN (fn))
32- if (DECL_DECLARED_CONSTEXPR_P (fn)
33- && DECL_NONSTATIC_MEMBER_FUNCTION_P (fn)
34- && !DECL_CONSTRUCTOR_P (fn))
35- {
36- error ("enclosing class of %q+D is not a literal type", fn);
37- DECL_DECLARED_CONSTEXPR_P (fn) = false;
38- }
39- }
40+ for (fn = TYPE_METHODS (t); fn; fn = DECL_CHAIN (fn))
41+ if (DECL_DECLARED_CONSTEXPR_P (fn)
42+ && TREE_CODE (fn) != TEMPLATE_DECL)
43+ validate_constexpr_fundecl (fn);
44 }
45
46 /* Check the validity of the bases and members declared in T. Add any
47diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
48index 3139ad8..fbd6c97 100644
49--- a/gcc/cp/decl.c
50+++ b/gcc/cp/decl.c
51@@ -5793,7 +5793,10 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
52 }
53 }
54
55- if (TREE_CODE (decl) == FUNCTION_DECL)
56+ if (TREE_CODE (decl) == FUNCTION_DECL
57+ /* For members, defer until finalize_literal_type_property. */
58+ && (!DECL_CLASS_SCOPE_P (decl)
59+ || !TYPE_BEING_DEFINED (DECL_CONTEXT (decl))))
60 validate_constexpr_fundecl (decl);
61
62 else if (!ensure_literal_type_for_constexpr_object (decl))
63diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
64index a41a1d5..9926d26 100644
65--- a/gcc/cp/semantics.c
66+++ b/gcc/cp/semantics.c
67@@ -5406,8 +5406,7 @@ is_valid_constexpr_fn (tree fun, bool complain)
68 }
69
70 if (DECL_NONSTATIC_MEMBER_FUNCTION_P (fun)
71- && COMPLETE_TYPE_P (DECL_CONTEXT (fun))
72- && !valid_type_in_constexpr_fundecl_p (DECL_CONTEXT (fun)))
73+ && !CLASSTYPE_LITERAL_P (DECL_CONTEXT (fun)))
74 {
75 ret = false;
76 if (complain)
77new file mode 100644
78index 0000000..4646f82
79--- /dev/null
80+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
81@@ -0,0 +1,18 @@
82+// PR c++/48296
83+// { dg-options -std=c++0x }
84+
85+struct X
86+{
87+ constexpr X() { }
88+ constexpr X f(X x) { return x; }
89+ constexpr X g(X x);
90+};
91+
92+constexpr X X::g(X x) { return x; }
93+
94+struct Y
95+{
96+ Y() { }
97+ constexpr Y f(Y y); // { dg-error "constexpr" }
98+ static constexpr Y g(Y y); // { dg-error "constexpr" }
99+};
100--
1011.7.0.4
102