scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 80b8ac00bc997d13b4391d6d58f9f35c44c81be5
parent 4ae875181944ff1af246660aa69e13053aef7ec6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 10 Aug 2016 08:31:06 +0200

Revert "[cc1] Allow declaration of global array variables"

This reverts commit 7cf23450ad628012dfb66d72f1796955d1b34d71.

Diffstat:
Mcc1/decl.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -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); }