summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitfld-7.c
blob: fdaa93f261a29869363e29fe9c5507522c26c32e (plain)
1
2
3
4
5
6
7
8
/* Test for rejection of typeof on bit-fields.  PR c/10333.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "-fshow-column" } */

struct { int a:1; } x;

typeof (x.a) z; /* { dg-error "9:applied to a bit-field" "typeof" } */