svn merge -r102224:107263 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch
[official-gcc.git] / gcc / testsuite / gcc.dg / bitfld-13.c
blobc88d8558897df4d677530353873fc5fba5f41f2b
1 /* Test invalid bit-field types: bug 18498. */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 int
6 main(void)
8 struct X {
9 int s[20] : 1; /* { dg-error "error: bit-field `s' has invalid type" } */
10 int *p : 2; /* { dg-error "error: bit-field `p' has invalid type" } */
11 int (*f)(float) : 3; /* { dg-error "error: bit-field `f' has invalid type" } */
12 } x;
13 return 0;