1 /* Test for -Wtraditional warnings on automatic aggregate initialization.
2 Note, gcc should omit these warnings in system header files.
3 By Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 8/22/2000. */
4 /* { dg-do compile } */
5 /* { dg-options "-Wtraditional" } */
13 struct foo f0
= { 0, 0 };
14 static struct foo f1
= { 0, 0 };
19 struct foo f3
= { 0, 0 }; /* { dg-warning "traditional C rejects automatic" "automatic aggregate initialization" } */
20 static struct foo f4
= { 0, 0 };
25 struct foo f5
= { 0, 0 }; /* { dg-bogus "traditional C rejects automatic" "__extension__ disables warnings" } */
30 struct foo f6
= { 0, 0 }; /* { dg-warning "traditional C rejects automatic" "__extension__ reenables warnings" } */
36 /* We are in system headers now, no -Wtraditional warnings should issue. */
38 struct foo f7
= { 0, 0 };
39 static struct foo f8
= { 0, 0 };
44 struct foo f9
= { 0, 0 };
45 static struct foo f10
= { 0, 0 };