ref: 86de680103aa512595733bc9024999b69de5f724
parent: 6b08a16dbf2e47ec630fd0f1dd575e82a5feb182
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Oct 7 13:34:22 EDT 2015
Admit & with functions Wtf they were thinking????
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -470,13 +470,15 @@
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);
}