commit ffbb1e8dedda4975725bfa5dc501cfbf589301b9
parent adb48e8988aad7d39acdeeb413e99fb4951695af
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 25 Aug 2015 15:25:28 +0200
Use SYMICMP() in pcompare()
There are several cases in integer constants, so this macro must be
used.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -500,7 +500,7 @@ pcompare(char op, Node *lp, Node *rp)
{
switch (BTYPE(rp)) {
case INT:
- if (rp->symbol && rp->sym->u.i == 0)
+ if (rp->constant && SYMICMP(rp->sym, 0))
rp = node(OCAST, pvoidtype, rp, NULL);
break;
case PTR: