fixed bug #715076
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 4 Apr 2003 12:27:08 +0000 (12:27 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 4 Apr 2003 12:27:08 +0000 (12:27 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2478 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 91a4f81e08fe35e461a888234810291af6c47aa9..dd7e0de77da28fae6ffe172bd35a800e5a9e8c26 100644 (file)
@@ -3232,7 +3232,6 @@ decorateType (ast * tree)
        {
          werror (E_TYPE_MISMATCH, "assignment", " ");
          printFromToType(RTYPE(tree),LTYPE(tree));
-         //goto errorTreeReturn;
        }
 
       /* if the left side of the tree is of type void
@@ -3283,12 +3282,15 @@ decorateType (ast * tree)
       if ((options.stackAuto || IFFUNC_ISREENT (LTYPE (tree))) && 
          !IFFUNC_ISBUILTIN(LTYPE(tree)))
        {
-         //FUNC_ARGS(tree->left->ftype) = 
-         //reverseVal (FUNC_ARGS(tree->left->ftype));
          reverseParms (tree->right);
        }
 
-      TETYPE (tree) = getSpec (TTYPE (tree) = LTYPE (tree)->next);
+      if (IS_CODEPTR(LTYPE(tree))) {
+       TTYPE(tree) = LTYPE(tree)->next->next;
+      } else {
+       TTYPE(tree) = LTYPE(tree)->next;
+      }
+      TETYPE (tree) = getSpec (TTYPE (tree));
       return tree;
 
       /*------------------------------------------------------------------*/