Anders Carlsson | 108229a | 2008-12-06 20:33:04 +0000 | [diff] [blame] | 1 | // RUN: clang %s -fsyntax-only -verify |
2 | |||||
3 | struct a { | ||||
4 | int a : -1; // expected-error{{bit-field 'a' has negative width}} | ||||
5 | int b : 33; // expected-error{{size of bit-field 'b' exceeds size of its type (32 bits)}} | ||||
6 | int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}} | ||||
7 | int d : (int)(1 + 0.25); | ||||
8 | }; |