summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch
new file mode 100644
index 0000000000..1ab94454a6
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0294-semantics.c-validate_constexpr_fundecl-Check-DECL_TE.patch
@@ -0,0 +1,42 @@
1From d633704af54cbca1991f0d2c7fc75ffadfc95cdc Mon Sep 17 00:00:00 2001
2From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Fri, 20 May 2011 19:02:33 +0000
4Subject: [PATCH] * semantics.c (validate_constexpr_fundecl): Check DECL_TEMPLATE_INFO
5 rather than DECL_TEMPLATE_INSTANTIATION.
6 (cxx_eval_call_expression): Likewise.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173974 138bc75d-0d04-0410-961f-82ee72b054a4
9
10index d019728..6083376 100644
11--- a/gcc/cp/semantics.c
12+++ b/gcc/cp/semantics.c
13@@ -5465,7 +5465,7 @@ validate_constexpr_fundecl (tree fun)
14 /* We already checked the original function. */
15 return fun;
16
17- if (!is_valid_constexpr_fn (fun, !DECL_TEMPLATE_INSTANTIATION (fun)))
18+ if (!is_valid_constexpr_fn (fun, !DECL_TEMPLATE_INFO (fun)))
19 {
20 DECL_DECLARED_CONSTEXPR_P (fun) = false;
21 return NULL;
22@@ -5689,7 +5689,7 @@ register_constexpr_fundef (tree fun, tree body)
23 if (!potential_rvalue_constant_expression (body))
24 {
25 DECL_DECLARED_CONSTEXPR_P (fun) = false;
26- if (!DECL_TEMPLATE_INSTANTIATION (fun))
27+ if (!DECL_TEMPLATE_INFO (fun))
28 require_potential_rvalue_constant_expression (body);
29 return NULL;
30 }
31@@ -6033,7 +6033,7 @@ cxx_eval_call_expression (const constexpr_call *old_call, tree t,
32 if (!allow_non_constant)
33 {
34 error_at (loc, "%qD is not a constexpr function", fun);
35- if (DECL_TEMPLATE_INSTANTIATION (fun)
36+ if (DECL_TEMPLATE_INFO (fun)
37 && DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT
38 (DECL_TI_TEMPLATE (fun))))
39 is_valid_constexpr_fn (fun, true);
40--
411.7.0.4
42