summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch
new file mode 100644
index 0000000000..334336f37d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0299-PR-c-49066.patch
@@ -0,0 +1,34 @@
1From 6c1b484bec9f87aaa5c648304ca556dd622b4206 Mon Sep 17 00:00:00 2001
2From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Sat, 21 May 2011 21:35:50 +0000
4Subject: [PATCH] PR c++/49066
5 * decl.c (duplicate_decls): Preserve DECL_DELETED_FN.
6
7git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174003 138bc75d-0d04-0410-961f-82ee72b054a4
8
9index 2905b49..aeb893f 100644
10--- a/gcc/cp/decl.c
11+++ b/gcc/cp/decl.c
12@@ -1686,6 +1686,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
13 error ("deleted definition of %qD", newdecl);
14 error ("after previous declaration %q+D", olddecl);
15 }
16+ DECL_DELETED_FN (newdecl) |= DECL_DELETED_FN (olddecl);
17 }
18
19 /* Deal with C++: must preserve virtual function table size. */
20new file mode 100644
21index 0000000..69bd0ac
22--- /dev/null
23+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted26.C
24@@ -0,0 +1,7 @@
25+// PR c++/49066
26+// { dg-options -std=c++0x }
27+
28+void foo() = delete; // { dg-error "declared here" }
29+void foo();
30+
31+int main() { foo(); } // { dg-error "deleted" }
32--
331.7.0.4
34