commit ee71aa8e400604c865f04db89601e2597da26ad5
parent a43a8ede995f69063e33713f304d5ced7b5b3edb
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 5 Aug 2014 17:50:15 +0200
Fix decay()
decay() generate a pointer from the name of a function or an array,
or in terms of types, a pointer to the type of the node of the
expression.
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -100,10 +100,7 @@ integeruop(char op, Node *np)
static Node *
decay(Node *np)
{
- Type *tp;
-
- tp = mktype(np->type->type, PTR, 0);
- return unarycode(OADDR, tp, np);
+ return unarycode(OADDR, mktype(np->type, PTR, NULL), np);
}
/*