]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/20011021-1.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / 20011021-1.c
CommitLineData
b621a4dd
ZW
1/* Test for various initializer warnings being suppressed by use of
2 designated initializers. */
3
4/* { dg-do compile } */
5/* { dg-options "-std=c99 -W -Wall -Wtraditional" } */
6
7
8struct t
9{
10 int a;
663b0134 11 int b; /* { dg-message "note: 'b' declared here" } */
b621a4dd
ZW
12 int c;
13};
14
15union u
16{
17 int n;
18 float i;
19};
20
21struct multilevel
22{
23 int x;
24 struct t t;
25 union u u;
26 union u v;
27 char *f;
28};
29
683d6ff9 30struct t T0 = { 1 }; /* { dg-warning "missing init" } */
663b0134 31
b621a4dd
ZW
32struct t T1 = { .a = 1 }; /* { dg-bogus "(missing|near) init" } */
33
34union u U0 = { 1 }; /* { dg-warning "initialization of union" } */
35union u U1 = { .i = 1 }; /* { dg-bogus "initialization of union" } */
36
37struct multilevel M =
38{
39 12,
683d6ff9 40 { .b = 3 }, /* { dg-bogus "missing init" } */
b621a4dd
ZW
41 { 4 }, /* { dg-warning "initialization of union" } */
42 { .n = 9 }, /* { dg-bogus "initialization of union" } */
43 /* "string here" */
683d6ff9 44}; /* { dg-warning "missing init" } */
32397f22 45/* { dg-message "declared here" "near init" { target *-*-* } 27 } */