summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch
new file mode 100644
index 0000000000..8a3b1d3128
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0251-gcc-cp-ChangeLog.patch
@@ -0,0 +1,55 @@
1From c58e945d1146bbe7778e5acc3d6079581cbcdc4b Mon Sep 17 00:00:00 2001
2From: fabien <fabien@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Wed, 11 May 2011 06:03:38 +0000
4Subject: [PATCH] gcc/cp/ChangeLog:
5
62011-05-11 Fabien Chene <fabien@gcc.gnu.org>
7 PR c++/48859
8 * init.c (diagnose_uninitialized_cst_or_ref_member_1): stop the
9 recursion if there is user defined constructor.
10
11gcc/testsuite/ChangeLog:
12
132011-05-11 Fabien Chene <fabien@gcc.gnu.org>
14 PR c++/48859
15 * g++.dg/init/pr48859.C: New.
16
17
18
19git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173644 138bc75d-0d04-0410-961f-82ee72b054a4
20
21index ff94b71..286bfb6 100644
22--- a/gcc/cp/init.c
23+++ b/gcc/cp/init.c
24@@ -1904,6 +1904,9 @@ diagnose_uninitialized_cst_or_ref_member_1 (tree type, tree origin,
25
26 field_type = strip_array_types (TREE_TYPE (field));
27
28+ if (type_has_user_provided_constructor (field_type))
29+ continue;
30+
31 if (TREE_CODE (field_type) == REFERENCE_TYPE)
32 {
33 ++ error_count;
34new file mode 100644
35index 0000000..8ef5c2e
36--- /dev/null
37+++ b/gcc/testsuite/g++.dg/init/pr48859.C
38@@ -0,0 +1,14 @@
39+// PR c++/48859
40+// { dg-do compile }
41+
42+struct HasConstructor {
43+ HasConstructor() {}
44+};
45+
46+class ConstMember {
47+ const HasConstructor empty_;
48+};
49+
50+void foo() {
51+ new ConstMember;
52+}
53--
541.7.0.4
55