c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-tag-4.c
blob9ff3ccb8d4b9f51b95f4e39f9d8e23af582b407b
1 /* Test for handling of tags. "enum foo;" is invalid after an existing
2 declaration (does not redeclare the tag) as well as before: bug 107164. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c99 -pedantic-errors" } */
6 enum e1; /* { dg-error "ISO C forbids forward references to 'enum' types" } */
7 enum e2 { E };
8 enum e2; /* { dg-error "empty declaration of 'enum' type does not redeclare tag" } */