Z80 peephole improvements - Implemented RFE #1919415, #1861376, #1880202, #1914434...
[fw/sdcc] / src / z80 / peep.c
index 6512b7d2a21bc6f1fd2517c4b8094383f8f7e537..bef434a7d51af643425f097f6afee16a3f4cc673 100644 (file)
@@ -29,7 +29,7 @@
 #include "SDCCpeeph.h"
 #include "gen.h"
 
-#define NOTUSEDERROR {fprintf (stderr, "SDCC internal error in notUsed() in %s, line %d\n", __FILE__, __LINE__);}
+#define NOTUSEDERROR() do {werror(E_INTERNAL_ERROR, __FILE__, __LINE__, "error in notUsed()");} while(0)
 
 /*#define D(_s) { printf _s; fflush(stdout); }*/
 #define D(_s)
@@ -89,7 +89,7 @@ isReturned(const char *what)
       // Find size of return value.
       specifier *spec;
       if(sym->type->select.d.dcl_type != FUNCTION)
-        NOTUSEDERROR
+        NOTUSEDERROR();
       spec = &(sym->etype->select.s);
       if(spec->noun == V_VOID)
          size = 0;
@@ -109,7 +109,7 @@ isReturned(const char *what)
     }
   else
     {
-      NOTUSEDERROR
+      NOTUSEDERROR();
       size = 4;
     }
 
@@ -169,7 +169,7 @@ findLabel (const lineNode *pl)
   /* sanity check */
   if (p == pl->line)
     {
-      NOTUSEDERROR
+      NOTUSEDERROR();
       return NULL;
     }