From 94ac9f2b4952fbd77bfdf39e753fcbca3e472883 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 7 May 2017 08:10:06 +0200 Subject: Accept extern initialized file-scope variables 'extern int i = 42;' at file scope (but not in function scope!) is allowed and is a proper definition, even though questionable style; some compilers warn about this. --- tests/tcctest.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/tcctest.c') diff --git a/tests/tcctest.c b/tests/tcctest.c index b6e4116..3a4860a 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -1752,6 +1752,8 @@ arrtype2 sinit22 = {5,6,7}; int sinit23[2] = { "astring" ? sizeof("astring") : -1, &sinit23 ? 42 : -1 }; +extern int external_inited = 42; + void init_test(void) { int linit1 = 2; -- cgit v1.3.1