diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0144-PR-c-48537.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0144-PR-c-48537.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0144-PR-c-48537.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0144-PR-c-48537.patch new file mode 100644 index 000000000..de2e44707 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0144-PR-c-48537.patch @@ -0,0 +1,45 @@ +From 065054b0b29c40548abd13c272431507d035b30a Mon Sep 17 00:00:00 2001 +From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 18 Apr 2011 23:29:30 +0000 +Subject: [PATCH 144/200] PR c++/48537 + * init.c (build_value_init): Handle UNION_TYPE the same. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172679 138bc75d-0d04-0410-961f-82ee72b054a4 + +index e1961c8..4798257 100644 +--- a/gcc/cp/init.c ++++ b/gcc/cp/init.c +@@ -343,7 +343,7 @@ build_value_init (tree type, tsubst_flags_t complain) + build_special_member_call (NULL_TREE, complete_ctor_identifier, + NULL, type, LOOKUP_NORMAL, + complain)); +- else if (TREE_CODE (type) != UNION_TYPE && TYPE_NEEDS_CONSTRUCTING (type)) ++ else if (TYPE_NEEDS_CONSTRUCTING (type)) + { + /* This is a class that needs constructing, but doesn't have + a user-provided constructor. So we need to zero-initialize +new file mode 100644 +index 0000000..0705047 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/union4.C +@@ -0,0 +1,17 @@ ++// PR c++/48537 ++// { dg-options -std=c++0x } ++ ++struct SFoo ++{ ++ SFoo() =delete; // { dg-error "declared" } ++}; ++ ++union UFoo // { dg-error "deleted" } ++{ ++ SFoo foo; ++}; ++ ++int main() ++{ ++ UFoo(); // { dg-error "deleted" } ++} +-- +1.7.0.4 + |