9fans archive / 1995 / 11 / 67 / prev next
From: ken@pla... ken@pla...
Subject: No subject
Date: Thu, 9 Nov 1995 08:31:13 -0500
> From: haertel@ich...
> The "8c" compiler sometimes loses track of side effects in expressions
> whose values aren't used. For example, the following program should
> print "1" but in fact prints "0".
> ...
thanks to haertel for finding this. my fix follows.
ken
21a22,24
> l = n->left;
> r = n->right;
> o = n->op;
23,24c26,31
< if(nn != Z)
< gmove(n, nn);
---
> if(nn == Z) {
> if(o == OINDEX)
> nullwarn(l, r);
> return;
> }
> gmove(n, nn);
28,30d34
< l = n->left;
< r = n->right;
< o = n->op;