[hackers] [scc] Revert "[cc1] Allow declaration of global array variables" || Roberto E. Vargas Caballero

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

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

    Revert "[cc1] Allow declaration of global array variables"
    
    This reverts commit 7cf23450ad628012dfb66d72f1796955d1b34d71.

diff --git a/cc1/decl.c b/cc1/decl.c
index ab13ae1..a167449 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -745,7 +745,7 @@ identifier(struct decl *dcl)
         /* TODO: Add warning about ANSI limits */
         if (!(tp->prop & TDEFINED) &&
             sclass != EXTERN && sclass != TYPEDEF &&
- (tp->op != ARY || yytoken != '=' && curctx != GLOBALCTX)) {
+ !(tp->op == ARY && yytoken == '=')) {
                 errorp("declared variable '%s' of incomplete type", name);
         }
 
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:23 CEST