fixed a compiler crash
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Oct 2001 09:02:28 +0000 (09:02 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 4 Oct 2001 09:02:28 +0000 (09:02 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1353 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c
src/SDCCicode.c
src/SDCCsymt.c

index 2e95ad9f275b7dbb961315004fa6287dde1b5fe4..1300ecba98892aa3f084544c461df7c9331f1193 100644 (file)
@@ -752,6 +752,7 @@ processParms (ast * func,
     fprintf (stderr, "assigned to type --> '");
     printTypeChain (defParm->type, stderr);
     fprintf (stderr, "'\n");
+    return 1;
   }
 
   /* if the parameter is castable then add the cast */
index 5755fc38557d06ba07b0db25117ee26e7cd08394..3968b3ea3302b07300dd5abbe717a535137d3928 100644 (file)
@@ -1101,9 +1101,9 @@ isOperandEqual (operand * left, operand * right)
   return 0;
 }
 
-/*-----------------------------------------------------------------*/
-/* isiCodeEqual - comapres two iCodes are returns true if yes      */
-/*-----------------------------------------------------------------*/
+/*-------------------------------------------------------------------*/
+/* isiCodeEqual - compares two iCodes are equal, returns true if yes */
+/*-------------------------------------------------------------------*/
 int 
 isiCodeEqual (iCode * left, iCode * right)
 {
@@ -1137,6 +1137,7 @@ isiCodeEqual (iCode * left, iCode * right)
          if (!isSymbolEqual (IC_FALSE (left), IC_FALSE (right)))
            return 0;
        }
+      
       return 1;
     }
   return 0;
index c0b1bcdc952336ec9ba78e1fcdee49b30ae7a457..433afeafc7ffa0b9cc7147f80f2982896016d46d 100644 (file)
@@ -1885,6 +1885,11 @@ printTypeChain (sym_link * start, FILE * of)
       nlr = 1;
     }
 
+  if (start==NULL) {
+    fprintf (of, "**err**");
+    return;
+  }
+
   /* print the chain as it is written in the source: */
   /* start with the last entry                       */
   for (type = start; type && type->next; type = type->next)