view gcc/testsuite/gcc.dg/bitfld-13.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Test invalid bit-field types: bug 18498.  */
/* { dg-do compile } */
/* { dg-options "" } */

int
main(void)
{
  struct X {
    int s[20] : 1; /* { dg-error "bit-field 's' has invalid type" } */
    int *p : 2; /* { dg-error "bit-field 'p' has invalid type" } */
    int (*f)(float) : 3; /* { dg-error "bit-field 'f' has invalid type" } */
  } x;
  return 0;
}