Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / Wmissing-field-initializers-4.c
blob57e4e4d3372c4c560268907775afc8ec0dc703a4
1 /* PR c/82283 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wmissing-field-initializers" } */
5 struct a {
6 int b;
7 };
9 struct c {
10 struct a d;
11 int e;
14 void f (struct c *);
16 void
17 g (void)
19 struct c h = {.d = (struct a){0}}; /* { dg-bogus "missing initializer" } */
20 f(&h);
23 struct {
24 struct {
25 int a;
26 int b;
27 } c[1];
28 } d = {
29 .c[0].a = 1,
30 .c[0].b = 1, /* { dg-bogus "missing initializer" } */
33 struct test_t {
34 int value1;
35 int value2;
38 struct test_t test[] = {
39 [0].value1 = 1,
40 [0].value2 = 2, /* { dg-bogus "missing initializer" } */
41 [1].value1 = 10,
42 [1].value2 = 20 /* { dg-bogus "missing initializer" } */