utah rcsid 1.25 87/07/07 20:30:32: Permit the ZE code for INCR/DECR in
authorDonn Seeley <donn@ucbvax.Berkeley.EDU>
Fri, 11 Dec 1987 16:36:44 +0000 (08:36 -0800)
committerDonn Seeley <donn@ucbvax.Berkeley.EDU>
Fri, 11 Dec 1987 16:36:44 +0000 (08:36 -0800)
zzzcode() to take a NAME as its second operand: this permits FLOAT and
DOUBLE operands to be handled, since floating constants are represented by
NAMEs.

SCCS-vsn: old/pcc/ccom.vax/local2.c 1.28

usr/src/old/pcc/ccom.vax/local2.c

index 84f2178..96dc187 100644 (file)
@@ -1,5 +1,5 @@
 # ifndef lint
 # ifndef lint
-static char *sccsid ="@(#)local2.c     1.27 (Berkeley) %G%";
+static char *sccsid ="@(#)local2.c     1.28 (Berkeley) %G%";
 # endif
 
 # include "pass2.h"
 # endif
 
 # include "pass2.h"
@@ -487,7 +487,7 @@ zzzcode( p, c ) register NODE *p; {
                putchar('\t');
 
        case 'E':       /* INCR and DECR, FOREFF */
                putchar('\t');
 
        case 'E':       /* INCR and DECR, FOREFF */
-               if (p->in.right->tn.lval == 1)
+               if (p->in.right->in.op == ICON && p->in.right->tn.lval == 1)
                        {
                        putstr( p->in.op == INCR ? "inc" : "dec" );
                        prtype(p->in.left);
                        {
                        putstr( p->in.op == INCR ? "inc" : "dec" );
                        prtype(p->in.left);