* src/pic/gen.h: Q&D solution for the bug, found by Jim Paris
[fw/sdcc] / src / SDCCsymt.c
index b9d4175a6e5a35d302441237f08049ec58b94765..95228673de2130475328ddd33c044ce59e380624 100644 (file)
@@ -2050,7 +2050,7 @@ comparePtrType (sym_link * dest, sym_link * src, bool bMustCast)
   int res;
 
   if (IS_VOID (src->next) && IS_VOID (dest->next))
-    return 1;
+    return bMustCast ? -1 : 1;
   if ((IS_VOID (src->next) && !IS_VOID (dest->next)) ||
       (!IS_VOID (src->next) && IS_VOID (dest->next)) )
     return -1;
@@ -2424,6 +2424,8 @@ aggregateToPointer (value * val)
           }
           break;
         case S_AUTO:
+          DCL_TYPE (val->type) = PTR_TYPE(SPEC_OCLS(val->etype));
+          break;
         case S_DATA:
         case S_REGISTER:
           DCL_TYPE (val->type) = POINTER;