static void cmp(int op, Symbol p, long n, int lab) { Type ty = signedint(p->type); listnodes(eqtree(op, cast(idtree(p), ty), cnsttree(ty, n)), lab, 0); }
Tree eqtree(int op, Tree l, Tree r) { Type xty = unqual(l->type), yty = unqual(r->type); if (isptr(xty) && isnullptr(r) || isptr(xty) && !isfunc(xty->type) && isvoidptr(yty) || (isptr(xty) && isptr(yty) && eqtype(unqual(xty->type), unqual(yty->type), 1))) { Type ty = unsignedptr; l = cast(l, ty); r = cast(r, ty); return simplify(mkop(op,ty), inttype, l, r); } if (isptr(yty) && isnullptr(l) || isptr(yty) && !isfunc(yty->type) && isvoidptr(xty)) return eqtree(op, r, l); return cmptree(op, l, r); }