]> thyrsus.com Git - intercal.git/commitdiff
Optimiser bugfix: handle width for C negation the same way as for INTERCAL unaries
authorAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 22:57:43 +0000 (23:57 +0100)
committerAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 22:57:43 +0000 (23:57 +0100)
src/feh2.c

index d2d528804fef4230e1597a1a81d7761c175325e8..99b4be52d8703c739ed62bdd8a4eb5250cf33e83 100644 (file)
@@ -743,7 +743,7 @@ void explexpr(node* np, FILE* fp)
     break;
 
   case C_NOT:
-    (void) fprintf(fp, "(~ ");
+    (void) fprintf(fp, "(~%d ", np->width);
     explexpr(np->rval, fp);
     (void) fprintf(fp, ")");
     break;
@@ -1440,7 +1440,7 @@ void prexpr(node *np, FILE *fp, int freenode)
 
     case C_NOT:
        (void) fprintf(fp, "(~");
-        tempint=np->rval->width; /* AIS */
+        tempint=np->width; /* AIS */
        prexpr(np->rval, fp, freenode);
        if (tempint == ick_Small_digits)
            (void) fprintf(fp, " & ick_Max_small)");