diff --git a/tests/syntax/init_call_ko.c b/tests/syntax/init_call_ko.c index 644ad18bd764340174d681950df7de317b459987..00ee4d8f946e08f613273e627cf09572fcaafd89 100644 --- a/tests/syntax/init_call_ko.c +++ b/tests/syntax/init_call_ko.c @@ -5,11 +5,11 @@ char *b(char* c){ return c; } int main(void) { - char a[] = b(""); - char m[] = 1; - char p[1] = 0; - extern char j[] = {0,1}; - char f[]; - static char n[]; + char a[] = b(""); // cannot be initialized with a function call + char m[] = 1; // cannot be initialized with a constant + char p[1] = 0; // even if sized + extern char j[] = {0,1}; // extern local variable cannot be initialized + char f[]; // unsized array must be initialized + static char n[]; // even if static return 0; } diff --git a/tests/syntax/oracle/init_call_ko.res.oracle b/tests/syntax/oracle/init_call_ko.res.oracle index 8db6a89d8e2951bcd3842af976ba00c370870c70..d61ea93e91f1c3daecd67a466b5201e2f1c3cc39 100644 --- a/tests/syntax/oracle/init_call_ko.res.oracle +++ b/tests/syntax/oracle/init_call_ko.res.oracle @@ -8,7 +8,7 @@ [kernel] init_call_ko.c:10: User Error: Array initializer must be an initializer list or string literal [kernel] init_call_ko.c:11: User Error: - 'extern' variable cannot have an initializer + 'extern' local variable cannot have an initializer [kernel] init_call_ko.c:12: User Error: variable f with array type needs an explicit size or an initializer [kernel] init_call_ko.c:13: User Error: