OSDN Git Service

In gcc/testsuite/:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 08:33:54 +0000 (08:33 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 08:33:54 +0000 (08:33 +0000)
2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4278236
        * obj-c++.dg/bad-forward-decl.mm: New

In gcc/objc/:
2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2005-10-04  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4278236
        * objc-act.c (objc_declare_class): Pick the right
        type tree.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164745 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/obj-c++.dg/bad-forward-decl.mm [new file with mode: 0644]

index ffd1c8d..2954a5a 100644 (file)
@@ -1,3 +1,13 @@
+2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       Merge from 'apple/trunk' branch on FSF servers.
+
+       2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
+
+       Radar 4278236
+       * objc-act.c (objc_declare_class): Pick the right
+       type tree.
+
 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        Merge from 'apple/trunk' branch on FSF servers.
index f63cde0..934d78d 100644 (file)
@@ -3092,7 +3092,9 @@ objc_declare_class (tree ident_list)
          if (record)
            {
              if (TREE_CODE (record) == TYPE_DECL)
-               type = DECL_ORIGINAL_TYPE (record);
+               type = DECL_ORIGINAL_TYPE (record) ? 
+                       DECL_ORIGINAL_TYPE (record) : 
+                       TREE_TYPE (record);
 
              if (!TYPE_HAS_OBJC_INFO (type)
                  || !TYPE_OBJC_INTERFACE (type))
index d287465..0360ef6 100644 (file)
@@ -1,3 +1,12 @@
+2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       Merge from 'apple/trunk' branch on FSF servers.
+       
+       2005-10-04  Fariborz Jahanian <fjahanian@apple.com>
+
+       Radar 4278236
+       * obj-c++.dg/bad-forward-decl.mm: New
+
 2010-09-30  Eric Botcazou  <ebotcazou@adacore.com>
 
        * ada/acats/run_acats: Revert revision 157037.
diff --git a/gcc/testsuite/obj-c++.dg/bad-forward-decl.mm b/gcc/testsuite/obj-c++.dg/bad-forward-decl.mm
new file mode 100644 (file)
index 0000000..e16db7e
--- /dev/null
@@ -0,0 +1,3 @@
+class TestCPP { };     /* { dg-error "previous declaration of" } */
+
+@class TestCPP;                /* { dg-error "redeclared as different kind of symbol" } */