fixed bug #477397
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Nov 2001 11:59:39 +0000 (11:59 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Nov 2001 11:59:39 +0000 (11:59 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1487 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c

index 0277d7ff20e9b64e0546af0a0dacefff012123f8..73d2d51fd9271505c52e052b99ee421f10e21b92 100644 (file)
@@ -697,7 +697,7 @@ processParms (ast * func,
       if (newType)
        {
          /* cast required; change this op to a cast. */
-         ast *parmCopy = resolveSymbols (copyAst (actParm));
+         ast *parmCopy = decorateType(resolveSymbols (copyAst (actParm)));
 
          actParm->type = EX_OP;
          actParm->opval.op = CAST;
@@ -751,7 +751,7 @@ processParms (ast * func,
   /* if the parameter is castable then add the cast */
   if (compareType (defParm->type, actParm->ftype) < 0)
     {
-      ast *pTree = resolveSymbols (copyAst (actParm));
+      ast *pTree = decorateType(resolveSymbols (copyAst (actParm)));
 
       /* now change the current one to a cast */
       actParm->type = EX_OP;
@@ -4171,7 +4171,7 @@ createFunction (symbol * name, ast * body)
   body = resolveSymbols (body);        /* resolve the symbols */
   body = decorateType (body);  /* propagateType & do semantic checks */
 
-  ex = newAst_VALUE (symbolVal (name));                /* create name       */
+  ex = newAst_VALUE (symbolVal (name)); /* create name */
   ex = newNode (FUNCTION, ex, body);
   ex->values.args = FUNC_ARGS(name->type);
   ex->decorated=1;