Debian Codegraph @

gcc/testsuite/gcc.dg/typename-vla-4.c

raw
1 /* { dg-do run }
2 * { dg-options "-std=gnu99" }
3 * */
4
5 int main()
6 {
7 int n = 1;
8 sizeof(int[n++]);
9 typeof(int[n++]); /* { dg-warning "empty declaration" } */
10 struct { int x[n++]; }; /* { dg-warning "no instance" } */
11 struct foo { int x[n++]; };
12 struct { int x[n++]; } x;
13 struct bar { int x[n++]; } y;
14 (int(*)[n++])0;
15 (typeof(int(*)[n++]))0;
16 (struct { int x[n++]; }*)0;
17 (struct q { int x[n++]; }*)0;
18 typeof(struct { int x[n++]; }); /* { dg-warning "empty declaration" } */
19 typeof(struct r { int x[n++]; }); /* { dg-warning "empty declaration" } */
20
21 if (13 != n)
22 __builtin_abort();
23 }