* gcc.dg/stack-check-5.c: Skip with -fstack-protector.
[official-gcc.git] / gcc / testsuite / gcc.dg / Wcxx-compat-17.c
blob78760d641ffadeaa6e9ae5c1eec235c586cb892e
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
3 const int v1; /* { dg-warning "invalid in C\[+\]\[+\]" } */
4 const char * const v2; /* { dg-warning "invalid in C\[+\]\[+\]" } */
5 struct s { int f1; int f2; };
6 const struct s v3; /* { dg-warning "invalid in C\[+\]\[+\]" } */
7 const int v4 = 1;
8 const char * const v5 = 0;
9 const struct s v6 = { 0, 0 };
10 const struct s v7 = { 0 };
11 void
12 f()
14 const int v11; /* { dg-warning "invalid in C\[+\]\[+\]" } */
15 const char * const v12; /* { dg-warning "invalid in C\[+\]\[+\]" } */
16 const struct s v13; /* { dg-warning "invalid in C\[+\]\[+\]" } */
17 const int v14 = 1;
18 const char * const v15 = 0;
19 const struct s v16 = { 0, 0 };
20 const struct s v17 = { 0 };