1f08c3bdfSopenharmony_ci/*
2f08c3bdfSopenharmony_ci * for array of char, ("...") as the initializer is an gcc language
3f08c3bdfSopenharmony_ci * extension. check that a parenthesized string initializer is handled
4f08c3bdfSopenharmony_ci * correctly and that -Wparen-string warns about it's use.
5f08c3bdfSopenharmony_ci */
6f08c3bdfSopenharmony_cistatic const char u[] = ("hello");
7f08c3bdfSopenharmony_cistatic const char v[] = {"hello"};
8f08c3bdfSopenharmony_cistatic const char v1[] = {("hello")};
9f08c3bdfSopenharmony_cistatic const char w[] = "hello";
10f08c3bdfSopenharmony_cistatic const char x[5] = "hello";
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_cistatic void f(void)
13f08c3bdfSopenharmony_ci{
14f08c3bdfSopenharmony_ci	char a[1/(sizeof(u) == 6)];
15f08c3bdfSopenharmony_ci	char b[1/(sizeof(v) == 6)];
16f08c3bdfSopenharmony_ci	char c[1/(sizeof(w) == 6)];
17f08c3bdfSopenharmony_ci	char d[1/(sizeof(x) == 5)];
18f08c3bdfSopenharmony_ci}
19f08c3bdfSopenharmony_ci/*
20f08c3bdfSopenharmony_ci * check-name: parenthesized string initializer
21f08c3bdfSopenharmony_ci * check-command: sparse -Wparen-string $file
22f08c3bdfSopenharmony_ci *
23f08c3bdfSopenharmony_ci * check-error-start
24f08c3bdfSopenharmony_ciinit-char-array1.c:6:26: warning: array initialized from parenthesized string constant
25f08c3bdfSopenharmony_ciinit-char-array1.c:8:28: warning: array initialized from parenthesized string constant
26f08c3bdfSopenharmony_ci * check-error-end
27f08c3bdfSopenharmony_ci */
28