Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / parse / array-size2.C
blob3c833472d69b409963bbdabe19b2dd5f995462c1
1 // PR c/25682
2 // { dg-do compile }
3 // Test whether we don't ICE on questionable constructs where offsetof
4 // should have been used instead.
6 struct S
8   char a[4];
9   int b;
12 extern void bar (char *, char *);
14 void
15 foo (void)
17   char g[(char *) &((struct S *) 0)->b - (char *) 0]; // { dg-error "constant" }
18   char h[(__SIZE_TYPE__) &((struct S *) 8)->b];       // { dg-error "constant" "" { xfail *-*-* } }
19   bar (g, h);