blob: 713a898fa06074cdf4f8fc84c187c4ae44c3e7a9 [file] [log] [blame]
Steve Naroff466a8f22009-02-20 17:57:11 +00001// RUN: clang %s -fsyntax-only -verify
2
3@interface X
4{
5 int a : -1; // expected-error{{bit-field 'a' has negative width}}
6
7 // rdar://6081627
8 int b : 33; // expected-error{{size of bit-field 'b' exceeds size of its type (32 bits)}}
9
10 int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}}
11 int d : (int)(1 + 0.25);
12
13 // rdar://6138816
14 int e : 0; // expected-error {{bit-field 'e' has zero width}}
15}
16@end
17