commit 121cea8b715ba2ca3a8c5abc4b330ded023a7cf8
parent c65ba1f014232a19cd2b4d27f1a06dc18b9c4c2d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 4 Sep 2015 20:19:09 +0200
Promote integer values in numericaluop()
Numericaluop() is called with unary numerical operators, which
can be floats or integers, and in the case of integers is mandatory
to do the integer promotion.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -129,6 +129,7 @@ numericaluop(char op, Node *np)
{
switch (BTYPE(np)) {
case INT:
+ np = promote(np);
case FLOAT:
if (op == ONEG && np->op == ONEG)
return np->left;