diff mbox

ObjC - another -fnext-runtime encoding fix

Message ID 1285692707.06388316@192.168.2.229
State New
Headers show

Commit Message

Nicola Pero Sept. 28, 2010, 4:51 p.m. UTC
Another small (obvious) fix for a typo (affecting only the next-runtime)
introduced with the big encoding patch.

Ok to apply ?

Thanks

Comments

Mike Stump Sept. 28, 2010, 5:25 p.m. UTC | #1
On Sep 28, 2010, at 9:51 AM, Nicola Pero wrote:
> Another small (obvious) fix for a typo (affecting only the next-runtime)
> introduced with the big encoding patch.
> 
> Ok to apply ?

Ok.
diff mbox

Patch

Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c (revision 164686)
+++ gcc/objc/objc-act.c (working copy)
@@ -8365,7 +8365,6 @@  static void
 encode_type (tree type, int curtype, int format)
 {
   enum tree_code code = TREE_CODE (type);
-  char c;
 
   /* Ignore type qualifiers other than 'const' when encoding a
      type.  */
@@ -8387,13 +8386,14 @@  encode_type (tree type, int curtype, int
          /* Kludge for backwards-compatibility with gcc-3.3: enums
             are always encoded as 'i' no matter what type they
             actually are (!).  */
-         c = 'i';
+         obstack_1grow (&util_obstack, 'i');
          break;
        }
       /* Else, they are encoded exactly like the integer type that is
         used by the compiler to store them.  */
     case INTEGER_TYPE:
       {
+       char c;
        switch (GET_MODE_BITSIZE (TYPE_MODE (type)))
          {
          case 8:  c = TYPE_UNSIGNED (type) ? 'C' : 'c'; break;
@@ -8437,6 +8437,7 @@  encode_type (tree type, int curtype, int
       }
     case REAL_TYPE:
       {
+       char c;
        /* Floating point types.  */
        switch (GET_MODE_BITSIZE (TYPE_MODE (type)))
          {
Index: gcc/objc/ChangeLog
===================================================================
--- gcc/objc/ChangeLog  (revision 164686)
+++ gcc/objc/ChangeLog  (working copy)
@@ -1,3 +1,8 @@ 
+2010-09-28  Nicola Pero  <nicola@nicola.brainstorm.co.uk>
+
+       * objc-act.c (encode_type): Fixed encoding enums with the next
+       runtime.
+
 2010-09-28  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        Merge from 'apple/trunk' branch on FSF servers.