summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch
new file mode 100644
index 0000000000..0881d83552
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0360-PR-c-47277.patch
@@ -0,0 +1,38 @@
1From 631b8035922a95739c34b650b88a139a8f16474a Mon Sep 17 00:00:00 2001
2From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Fri, 27 May 2011 20:48:24 +0000
4Subject: [PATCH] PR c++/47277
5 * parser.c (cp_parser_unqualified_id): Don't check
6 constructor_name_p for enums.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174363 138bc75d-0d04-0410-961f-82ee72b054a4
9
10index 4d6ddcc..bc2b5bd 100644
11--- a/gcc/cp/parser.c
12+++ b/gcc/cp/parser.c
13@@ -4320,7 +4320,8 @@ cp_parser_unqualified_id (cp_parser* parser,
14 && (cp_lexer_peek_nth_token (parser->lexer, 2)->type
15 != CPP_LESS)
16 && (token->u.value == TYPE_IDENTIFIER (scope)
17- || constructor_name_p (token->u.value, scope)))
18+ || (CLASS_TYPE_P (scope)
19+ && constructor_name_p (token->u.value, scope))))
20 {
21 cp_lexer_consume_token (parser->lexer);
22 return build_nt (BIT_NOT_EXPR, scope);
23new file mode 100644
24index 0000000..5575ca6
25--- /dev/null
26+++ b/gcc/testsuite/g++.dg/cpp0x/enum18.C
27@@ -0,0 +1,8 @@
28+// PR c++/47277
29+// { dg-options -std=c++0x }
30+
31+int main(void) {
32+ enum e {};
33+ e ev;
34+ ev.e::~e_u(); // { dg-error "" }
35+}
36--
371.7.0.4
38