--- /sys/src/cmd/cc/pgen.c +++ /sys/src/cmd/cc/pgen.c @@ -288,7 +288,7 @@ loop: if(l->type == T) break; if(!typeswitch[l->type->etype]) { - diag(n, "switch expression must be integer"); + diag(n, "switch expression must be integer (not vlong)"); break; } @@ -573,8 +573,8 @@ bcomplex(Node *n, Node *c) } if(c != Z && n->op == OCONST && deadheads(c)) return 1; - /* this is not quite right yet, so ignore it for now */ - if(0 && newvlongcode && typev[n->type->etype] && machcap(Z)) { + if(newvlongcode && typev[n->type->etype] && machcap(Z)) { + nod = znode; b = &nod; b->op = ONE; b->left = n; @@ -582,7 +582,8 @@ bcomplex(Node *n, Node *c) *b->right = *nodconst(0); b->right->type = n->type; b->type = types[TLONG]; - cgen(b, Z); + xcom(b); + boolgen(b, 1, Z); return 0; } bool64(n);