[hackers] [scc] Revert "[cc1] Reemit array variables with incomplete type" || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 10 Aug 2016 08:53:14 +0200 (CEST)

commit f332bea5b7c3758acad57042f620fd1663ab4f29
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 10 08:31:07 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 10 08:31:07 2016 +0200

    Revert "[cc1] Reemit array variables with incomplete type"
    
    This reverts commit 137e6e88fc39d5fffdd3423e09967f586f39887c.

diff --git a/cc1/decl.c b/cc1/decl.c
index a167449..20df8fd 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -710,19 +710,6 @@ redcl(Symbol *sym, Type *tp, Symbol **pars, int sclass)
                 break;
         }
         sym->flags = flags;
- if (tp->op == ARY &&
- !(sym->type->prop&TDEFINED) &&
- tp->prop&TDEFINED) {
- /*
- * The symbol was already emitted, but in case of being an
- * array it was emitted with an incorrect type, so the most
- * simple solution is to emit twice the symbol, and let to
- * the second declaration to have the correct type.
- */
- sym->type = tp;
- sym->flags &= ~SEMITTED;
- emit(ODECL, sym);
- }
 
         return sym;
 
Received on Wed Aug 10 2016 - 08:53:14 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 10 2016 - 09:00:26 CEST