In gcc/cp/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
authorNicola Pero <nicola.pero@meta-innovation.com>
Sun, 17 Oct 2010 22:34:39 +0000 (22:34 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Sun, 17 Oct 2010 22:34:39 +0000 (22:34 +0000)
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.

From-SVN: r165602

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/method-namespace-2.mm [new file with mode: 0644]

index fc26e00d34f3b3aa59fe7dc3a5d5fc0ce4c64a24..9073ccb6ea364f6830d322859717eb1079e37242 100644 (file)
@@ -1,3 +1,13 @@
+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.
index 670337e5f464febd61615e2a130da1666ae144a8..cfc3dddb98a5333e7e14cae4e4c9f2bd5b865e91 100644 (file)
@@ -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);
index dfdaa82e26e27bce38f70245364bafda28a5fc37..57a1092da54df26454e7b75a1a78f7edbadd0a75 100644 (file)
@@ -1,3 +1,12 @@
+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.
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 (file)
index 0000000..3e1c9d1
--- /dev/null
@@ -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;
+}