blob: 9b0d6a1fbdfb255b51f6b242d1db821cb4bcd6d7 [file] [log] [blame]
Anders Carlsson108229a2008-12-06 20:33:04 +00001// RUN: clang %s -fsyntax-only -verify
2
3struct 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};