commit 7c1a9ff12e2649a9e47af25f8a958bb41c10ff81
parent 5f038fa5f700d646549f1561cabb9c2e221498ad
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sun, 20 Apr 2014 09:12:29 +0200
Simplify bitlogic()
Due to the last changes of typeconv() this function can be
simplified.
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/expr.c b/expr.c
@@ -62,13 +62,9 @@ typeconv(Node **p1, Node **p2)
static Node *
bitlogic(char op, Node *np1, Node *np2)
{
- np1 = promote(np1);
- np2 = promote(np2);
-
if (np1->typeop != INT || np2->typeop != INT)
error("No integer operand in bit logical operation");
- if (np1->utype != np2->utype)
- typeconv(&np1, &np2);
+ typeconv(&np1, &np2);
return bincode(op, np1->type, np1, np2);
}