From bcd94beedf4eed5de8522daa3aa07c12aa19ee0a Mon Sep 17 00:00:00 2001 From: Pierre Nigron <pierre.nigron@cea.fr> Date: Fri, 25 Aug 2023 10:10:29 +0200 Subject: [PATCH] Comment test + Oracle --- tests/syntax/init_call_ko.c | 12 ++++++------ tests/syntax/oracle/init_call_ko.res.oracle | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/syntax/init_call_ko.c b/tests/syntax/init_call_ko.c index 644ad18bd76..00ee4d8f946 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 8db6a89d8e2..d61ea93e91f 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: -- GitLab