1 /* Test for C99 declarations in for loops. Test constraints are diagnosed for
2 C11: struct and union tags can't be declared there (affirmed in response to
3 DR#277). Based on c99-fordecl-3.c. */
4 /* { dg-do compile } */
5 /* { dg-options "-std=c11 -pedantic-errors" } */
10 for (struct s
{ int p
; } *p
= 0; ;) /* { dg-error "'struct s' declared in 'for' loop initial declaration" } */
12 for (union u
{ int p
; } *p
= 0; ;) /* { dg-error "'union u' declared in 'for' loop initial declaration" } */