From 863a13df07e59f59b4c2ad965dfad13777f5c696 Mon Sep 17 00:00:00 2001 From: johanknol Date: Thu, 4 Oct 2001 09:02:28 +0000 Subject: [PATCH] fixed a compiler crash git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1353 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCast.c | 1 + src/SDCCicode.c | 7 ++++--- src/SDCCsymt.c | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/SDCCast.c b/src/SDCCast.c index 2e95ad9f..1300ecba 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -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 */ diff --git a/src/SDCCicode.c b/src/SDCCicode.c index 5755fc38..3968b3ea 100644 --- a/src/SDCCicode.c +++ b/src/SDCCicode.c @@ -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; diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index c0b1bcdc..433afeaf 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -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) -- 2.30.2