1 // RUN: %clang_cc1 %s -fsyntax-only -verify
5 int a : -1; // expected-error{{bit-field 'a' has negative width}}
8 int b : 33; // expected-error{{size of bit-field 'b' (33 bits) exceeds size of its type (32 bits)}}
10 int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}}
11 int d : (int)(1 + 0.25);
14 int e : 0; // expected-error {{bit-field 'e' has zero width}}
23 @interface WithBitFields: Base {
24 void *isa; // expected-note {{previous definition is here}}
27 int c: 5; // expected-note {{previous definition is here}}
31 @implementation WithBitFields {
32 char *isa; // expected-error {{instance variable 'isa' has conflicting type: 'char *' vs 'void *'}}
35 int c: 3; // expected-error {{instance variable 'c' has conflicting bit-field width}}