Commit f9854978 authored by Ken Thompson's avatar Ken Thompson

bug 142

order of evaluation && and ||

R=r
OCL=27294
CL=27294
parent 36570615
...@@ -104,10 +104,10 @@ cgen(Node *n, Node *res) ...@@ -104,10 +104,10 @@ cgen(Node *n, Node *res)
nr = n->right; nr = n->right;
if(nl != N && nl->ullman >= UINF) if(nl != N && nl->ullman >= UINF)
if(nr != N && nr->ullman >= UINF) { if(nr != N && nr->ullman >= UINF) {
tempname(&n1, nr->type); tempname(&n1, nl->type);
cgen(nr, &n1); cgen(nl, &n1);
n2 = *n; n2 = *n;
n2.right = &n1; n2.left = &n1;
cgen(&n2, res); cgen(&n2, res);
goto ret; goto ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment