diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-17 22:34:39 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-17 22:34:39 +0000 |
commit | 260681ca78b951dfaefddda0a3817d721d6a5ae9 (patch) | |
tree | 6f8d19894181d0532fe4e207cdf889906c554043 /gcc | |
parent | f15f2e565f60086a06501385a941899fb4b6fb7b (diff) | |
download | gcc-260681ca78b951dfaefddda0a3817d721d6a5ae9.tar.gz |
In gcc/cp/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from apple/trunk branch on FSF servers.
2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
Radar 4516785
* parser.c (cp_parser_simple_type_specifier): Don't lookup for
objc object types if type is scope qualified.
In gcc/testsuite/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-04-19 Fariborz Jahanian <fjahanian@apple.com>
Radar 4516785
* obj-c++.dg/method-namespace-2.mm: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165602 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/obj-c++.dg/method-namespace-2.mm | 25 |
4 files changed, 45 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fc26e00d34f..9073ccb6ea3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,6 +1,16 @@ 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from apple/trunk branch on FSF servers. + + 2006-04-19 Fariborz Jahanian <fjahanian@apple.com> + + Radar 4516785 + * parser.c (cp_parser_simple_type_specifier): Don't lookup for + objc object types if type is scope qualified. + +2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> + + Merge from apple/trunk branch on FSF servers. 2006-03-27 Fariborz Jahanian <fjahanian@apple.com> diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 670337e5f46..cfc3dddb98a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12753,7 +12753,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, /* As a last-ditch effort, see if TYPE is an Objective-C type. If it is, then the '<'...'>' enclose protocol names rather than template arguments, and so everything is fine. */ - if (c_dialect_objc () + if (c_dialect_objc () && !parser->scope && (objc_is_id (type) || objc_is_class_name (type))) { tree protos = cp_parser_objc_protocol_refs_opt (parser); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dfdaa82e26e..57a1092da54 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,15 @@ 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. + + 2006-04-19 Fariborz Jahanian <fjahanian@apple.com> + + Radar 4516785 + * obj-c++.dg/method-namespace-2.mm: New. + +2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com> + + Merge from 'apple/trunk' branch on FSF servers. 2006-03-27 Fariborz Jahanian <fjahanian@apple.com> diff --git a/gcc/testsuite/obj-c++.dg/method-namespace-2.mm b/gcc/testsuite/obj-c++.dg/method-namespace-2.mm new file mode 100644 index 00000000000..3e1c9d123ba --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/method-namespace-2.mm @@ -0,0 +1,25 @@ +/* Test that qualified type is resolved to its proper type. */ +/* { dg-do compile } */ + +@interface Object +{ + int I[100]; +} +@end + +namespace HC +{ + +struct Object +{ + void test(); +}; + +} // namespace HC + +int main() +{ + HC::Object* object; + object->test(); // Must compile with no error + return 0; +} |