bitfield.c revision cd08707a960842223e4af9ab82c729ba179290c0
1// RUN: clang %s -fsyntax-only -verify 2 3struct a { 4 int a : -1; // expected-error{{bit-field 'a' has negative width}} 5 6 // rdar://6081627 7 int b : 33; // expected-error{{size of bit-field 'b' exceeds size of its type (32 bits)}} 8 9 int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}} 10 int d : (int)(1 + 0.25); 11 12 // rdar://6138816 13 int e : 0; // expected-error {{bit-field 'e' has zero width}} 14}; 15