diff options
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.patch | 55 |
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 @@ | |||
1 | From c58e945d1146bbe7778e5acc3d6079581cbcdc4b Mon Sep 17 00:00:00 2001 | ||
2 | From: fabien <fabien@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Wed, 11 May 2011 06:03:38 +0000 | ||
4 | Subject: [PATCH] gcc/cp/ChangeLog: | ||
5 | |||
6 | 2011-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 | |||
11 | gcc/testsuite/ChangeLog: | ||
12 | |||
13 | 2011-05-11 Fabien Chene <fabien@gcc.gnu.org> | ||
14 | PR c++/48859 | ||
15 | * g++.dg/init/pr48859.C: New. | ||
16 | |||
17 | |||
18 | |||
19 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173644 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
20 | |||
21 | index 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; | ||
34 | new file mode 100644 | ||
35 | index 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 | -- | ||
54 | 1.7.0.4 | ||
55 | |||