commit 86de680103aa512595733bc9024999b69de5f724
parent 6b08a16dbf2e47ec630fd0f1dd575e82a5feb182
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 7 Oct 2015 17:34:22 +0200
Admit & with functions
Wtf they were thinking????
Diffstat:
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -470,13 +470,15 @@ incdec(Node *np, char op)
static Node *
address(char op, Node *np)
{
- chklvalue(np);
- if (np->symbol && (np->sym->flags & ISREGISTER))
- error("address of register variable '%s' requested", yytext);
- if (np->op == OPTR) {
- Node *new = np->left;
- free(np);
- return new;
+ if (BTYPE(np) != FTN) {
+ chklvalue(np);
+ if (np->symbol && (np->sym->flags & ISREGISTER))
+ errorp("address of register variable '%s' requested", yytext);
+ if (np->op == OPTR) {
+ Node *new = np->left;
+ free(np);
+ return new;
+ }
}
return node(op, mktype(np->type, PTR, 0, NULL), np, NULL);
}