PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / Wcxx-compat-20.c
blobaf774acc81833ea4fa8be234b18974c8bef87baf
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
3 typedef struct s { const int i; } s; /* { dg-message "should be initialized" } */
4 union u {const int a; double b;}; /* { dg-message "should be initialized" } */
5 struct ts { int a; s v;};
6 struct ta { int a; s v[2];};
8 void f ()
10 s v1; /* { dg-warning "uninitialized const member in" } */
11 s va[2]; /* { dg-warning "uninitialized const member in" } */
12 union u v2; /* { dg-warning "uninitialized const member in" } */
13 struct ts v3; /* { dg-warning "uninitialized const member in" } */
14 struct ta ta[2]; /* { dg-warning "uninitialized const member in" } */