summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 12:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:41 +0100
commit478deec11f3349d61b1a922f047dc958dc07262a (patch)
tree1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch
parentd42dccf886983ba14ccc868041d7bea0cf1a260e (diff)
downloadpoky-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/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch
new file mode 100644
index 0000000000..8edeac908e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0033-semantics.c-is_valid_constexpr_fn-Specify-input-loca.patch
@@ -0,0 +1,71 @@
1From 7ca62e4f7e0e27a4282dc14e5b89c389d5c194bb Mon Sep 17 00:00:00 2001
2From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 29 Mar 2011 14:26:21 +0000
4Subject: [PATCH 033/200] * semantics.c (is_valid_constexpr_fn): Specify input location.
5
6git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171674 138bc75d-0d04-0410-961f-82ee72b054a4
7
8index 23bb021..a41a1d5 100644
9--- a/gcc/cp/semantics.c
10+++ b/gcc/cp/semantics.c
11@@ -5390,8 +5390,8 @@ is_valid_constexpr_fn (tree fun, bool complain)
12 {
13 ret = false;
14 if (complain)
15- error ("invalid type for parameter %q#D of constexpr function",
16- parm);
17+ error ("invalid type for parameter %d of constexpr "
18+ "function %q+#D", DECL_PARM_INDEX (parm), fun);
19 }
20
21 if (!DECL_CONSTRUCTOR_P (fun))
22@@ -5401,7 +5401,7 @@ is_valid_constexpr_fn (tree fun, bool complain)
23 {
24 ret = false;
25 if (complain)
26- error ("invalid return type %qT of constexpr function %qD",
27+ error ("invalid return type %qT of constexpr function %q+D",
28 rettype, fun);
29 }
30
31@@ -5411,7 +5411,7 @@ is_valid_constexpr_fn (tree fun, bool complain)
32 {
33 ret = false;
34 if (complain)
35- error ("enclosing class of %q#D is not a literal type", fun);
36+ error ("enclosing class of %q+#D is not a literal type", fun);
37 }
38 }
39
40index a3706d6..183d3f7 100644
41--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
42+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
43@@ -1,12 +1,11 @@
44 // Test that we explain why a template instantiation isn't constexpr
45 // { dg-options -std=c++0x }
46-// { dg-prune-output "not a constexpr function" }
47
48 template <class T>
49 struct A
50 {
51 T t;
52- constexpr int f() { return 42; }
53+ constexpr int f() { return 42; } // { dg-error "enclosing class" }
54 };
55
56 struct B { B(); operator int(); };
57@@ -14,8 +13,8 @@ struct B { B(); operator int(); };
58 constexpr A<int> ai = { 42 };
59 constexpr int i = ai.f();
60
61-constexpr int b = A<B>().f(); // { dg-error "enclosing class" }
62+constexpr int b = A<B>().f(); // { dg-error "not a constexpr function" }
63
64 template <class T>
65-constexpr int f (T t) { return 42; }
66-constexpr int x = f(B()); // { dg-error "parameter" }
67+constexpr int f (T t) { return 42; } // { dg-error "parameter" }
68+constexpr int x = f(B()); // { dg-error "constexpr function" }
69--
701.7.0.4
71