but emit warning (recursion is not supported for pic14)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4497
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-12-01 Raphael Neider <rneider AT web.de>
+
+ * src/pic/pcode.c (register_reassign): do not crash on recursive code
+ but emit warning (recursion is not supported for pic14)
+
2006-11-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/mcs51/peeph.def: added 101.a,b (moves to int/long xdata)
2006-11-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* src/mcs51/peeph.def: added 101.a,b (moves to int/long xdata)
pc = setFirstItem(pb->function_entries);
if(!pc)
return idx;
pc = setFirstItem(pb->function_entries);
if(!pc)
return idx;
+
+ if (pb->visited) {
+ static int output = 0;
+ if (output < 3) {
+ pc = findNextpCode(pb->pcHead, PC_FUNCTION);
+ fprintf(stderr, "WARNING: Recursive code (%s) probably won't work, check the .asm file.\n",
+ pc ? PCF(pc)->fname : "unknown function");
+ output++;
+ }
+ return idx;
+ }