diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-06-12 20:56:57 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-14 15:29:15 +0100 |
commit | ec9b6d061b8495b9316ae90e5a71a499ef2873ee (patch) | |
tree | dc922c9ddd98f937eb2095b07f6c3b5043e3a491 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch | |
parent | fbc60cc5ba2284bfcaea8c82001a49b7795cc2a2 (diff) | |
download | poky-ec9b6d061b8495b9316ae90e5a71a499ef2873ee.tar.gz |
gcc-4.6.0: Bring in patches from FSF 4.6 branch
This brings in new patches from 4.6 release branch
updates the comment section of existing branch to not
contain patch numbers.
Tested build on qemu for arm ppc mips x86 and x86_64
(From OE-Core rev: 3968f33b6542cf20cf63cf49bfbc033bd2486295)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch new file mode 100644 index 0000000000..05320ac06a --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0335-PR-c-48935.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From 388aa866785638f2769c4e628fb9e6139d1bdaee Mon Sep 17 00:00:00 2001 | ||
2 | From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Wed, 25 May 2011 15:26:42 +0000 | ||
4 | Subject: [PATCH] PR c++/48935 | ||
5 | * parser.c (cp_parser_constructor_declarator_p): Don't check | ||
6 | constructor_name_p for enums. | ||
7 | (cp_parser_diagnose_invalid_type_name): Correct error message. | ||
8 | |||
9 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174210 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
10 | |||
11 | index 68c2f88..4c7d9cb 100644 | ||
12 | --- a/gcc/cp/parser.c | ||
13 | +++ b/gcc/cp/parser.c | ||
14 | @@ -2788,7 +2788,7 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, | ||
15 | "%qT is a dependent scope", | ||
16 | parser->scope, id, parser->scope); | ||
17 | else if (TYPE_P (parser->scope)) | ||
18 | - error_at (location, "%qE in class %qT does not name a type", | ||
19 | + error_at (location, "%qE in %q#T does not name a type", | ||
20 | id, parser->scope); | ||
21 | else | ||
22 | gcc_unreachable (); | ||
23 | @@ -19642,7 +19642,7 @@ cp_parser_constructor_declarator_p (cp_parser *parser, bool friend_p) | ||
24 | /* If we have a class scope, this is easy; DR 147 says that S::S always | ||
25 | names the constructor, and no other qualified name could. */ | ||
26 | if (constructor_p && nested_name_specifier | ||
27 | - && TYPE_P (nested_name_specifier)) | ||
28 | + && CLASS_TYPE_P (nested_name_specifier)) | ||
29 | { | ||
30 | tree id = cp_parser_unqualified_id (parser, | ||
31 | /*template_keyword_p=*/false, | ||
32 | new file mode 100644 | ||
33 | index 0000000..ebb4868 | ||
34 | --- /dev/null | ||
35 | +++ b/gcc/testsuite/g++.dg/cpp0x/enum16.C | ||
36 | @@ -0,0 +1,6 @@ | ||
37 | +// PR c++/48935 | ||
38 | +// { dg-options -std=c++0x } | ||
39 | + | ||
40 | +enum class ENUM { a }; | ||
41 | + | ||
42 | +ENUM::Type func() { return ENUM::a; } // { dg-error "does not name a type" } | ||
43 | diff --git a/gcc/testsuite/g++.dg/parse/error15.C b/gcc/testsuite/g++.dg/parse/error15.C | ||
44 | index 2352193..607a1db 100644 | ||
45 | --- a/gcc/testsuite/g++.dg/parse/error15.C | ||
46 | +++ b/gcc/testsuite/g++.dg/parse/error15.C | ||
47 | @@ -12,7 +12,7 @@ namespace N | ||
48 | |||
49 | N::A f2; // { dg-error "1:invalid use of template-name 'N::A' without an argument list" } | ||
50 | N::INVALID f3; // { dg-error "1:'INVALID' in namespace 'N' does not name a type" } | ||
51 | -N::C::INVALID f4; // { dg-error "1:'INVALID' in class 'N::C' does not name a type" } | ||
52 | +N::C::INVALID f4; // { dg-error "1:'INVALID' in 'struct N::C' does not name a type" } | ||
53 | N::K f6; // { dg-error "1:'K' in namespace 'N' does not name a type" } | ||
54 | typename N::A f7; | ||
55 | // { dg-error "13:invalid use of template-name 'N::A' without an argument list" "13" { target *-*-* } 17 } | ||
56 | @@ -22,7 +22,7 @@ struct B | ||
57 | { | ||
58 | N::A f2; // { dg-error "3:invalid use of template-name 'N::A' without an argument list" } | ||
59 | N::INVALID f3; // { dg-error "3:'INVALID' in namespace 'N' does not name a type" } | ||
60 | - N::C::INVALID f4; // { dg-error "3:'INVALID' in class 'N::C' does not name a type" } | ||
61 | + N::C::INVALID f4; // { dg-error "3:'INVALID' in 'struct N::C' does not name a type" } | ||
62 | N::K f6; // { dg-error "3:'K' in namespace 'N' does not name a type" } | ||
63 | typename N::A f7; | ||
64 | // { dg-error "15:invalid use of template-name 'N::A' without an argument list" "15" { target *-*-* } 27 } | ||
65 | @@ -33,7 +33,7 @@ struct C | ||
66 | { | ||
67 | N::A f2; // { dg-error "3:invalid use of template-name 'N::A' without an argument list" } | ||
68 | N::INVALID f3; // { dg-error "3:'INVALID' in namespace 'N' does not name a type" } | ||
69 | - N::C::INVALID f4; // { dg-error "3:'INVALID' in class 'N::C' does not name a type" } | ||
70 | + N::C::INVALID f4; // { dg-error "3:'INVALID' in 'struct N::C' does not name a type" } | ||
71 | N::K f6; // { dg-error "3:'K' in namespace 'N' does not name a type" } | ||
72 | typename N::A f7; // { dg-error "15:invalid use of template-name 'N::A' without an argument list" } | ||
73 | }; | ||
74 | -- | ||
75 | 1.7.0.4 | ||
76 | |||