annotate gcc/testsuite/gcc.dg/Wcxx-compat-20.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-Wc++-compat" } */
kono
parents:
diff changeset
3 typedef struct s { const int i; } s; /* { dg-message "should be initialized" } */
kono
parents:
diff changeset
4 union u {const int a; double b;}; /* { dg-message "should be initialized" } */
kono
parents:
diff changeset
5 struct ts { int a; s v;};
kono
parents:
diff changeset
6 struct ta { int a; s v[2];};
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 void f ()
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 s v1; /* { dg-warning "uninitialized const member in" } */
kono
parents:
diff changeset
11 s va[2]; /* { dg-warning "uninitialized const member in" } */
kono
parents:
diff changeset
12 union u v2; /* { dg-warning "uninitialized const member in" } */
kono
parents:
diff changeset
13 struct ts v3; /* { dg-warning "uninitialized const member in" } */
kono
parents:
diff changeset
14 struct ta ta[2]; /* { dg-warning "uninitialized const member in" } */
kono
parents:
diff changeset
15 }