[hackers] [scc] Admit & with functions || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 7 Oct 2015 17:44:48 +0200 (CEST)

commit 86de680103aa512595733bc9024999b69de5f724
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Oct 7 17:34:22 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Oct 7 17:37:32 2015 +0200

    Admit & with functions
    
    Wtf they were thinking????

diff --git a/cc1/expr.c b/cc1/expr.c
index 7fbde46..5211692 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -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);
 }
Received on Wed Oct 07 2015 - 17:44:48 CEST

This archive was generated by hypermail 2.3.0 : Wed Oct 07 2015 - 17:48:29 CEST