* src/SDCCast.c (astErrors): fixed bug #846007
* src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3031
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-11-27 Erik Petrich <epetrich@ivorytower.norman.ok.us>
+
+ * src/SDCClrange.c (findNextUseSym, rlivePoint): fixed bug #849795
+ * src/SDCCast.c (astErrors): fixed bug #846007
+ * src/SDCCsymt.c (checkFunction): fixed follow-up bug on bug #846007
+
2003-11-26 Erik Petrich <epetrich@ivorytower.norman.ok.us>
* src/SDCCast.c (decorateType): disabled a transformation I added in
{
if (t->isError)
errors++;
+
+ if (t->type == EX_VALUE
+ && t->opval.val->sym
+ && t->opval.val->sym->undefined)
+ errors++;
+
errors += astErrors(t->left);
errors += astErrors(t->right);
}
if (retval)
{
- markAlive (ic, ebp->ech, sym->key);
+ if (ic) markAlive (ic, ebp->ech, sym->key);
return 1;
}
alive = succ->sch->rlive;
while ((succ = setNextItem (ebbs[i]->succList)))
{
- alive = bitVectIntersect (alive, succ->sch->rlive);
+ if (succ->sch)
+ alive = bitVectIntersect (alive, succ->sch->rlive);
}
- alive = bitVectCplAnd ( bitVectCopy (ebbs[i]->ech->rlive), alive);
+ if (ebbs[i]->ech)
+ alive = bitVectCplAnd ( bitVectCopy (ebbs[i]->ech->rlive), alive);
for (key = 1; key < alive->size; key++)
{
fprintf (stderr, "checkFunction: %s ", sym->name);
}
+ if (!IS_DECL(sym->type) || DCL_TYPE(sym->type)!=FUNCTION)
+ {
+ werror(E_SYNTAX_ERROR, sym->name);
+ return 0;
+ }
+
/* make sure the type is complete and sane */
checkTypeSanity(((symbol *)sym)->etype, ((symbol *)sym)->name);