mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 06:46:08 +00:00
9 lines
335 B
C
9 lines
335 B
C
![]() |
// RUN: clang %s -fsyntax-only -verify
|
||
|
|
||
|
struct a {
|
||
|
int a : -1; // expected-error{{bit-field 'a' has negative width}}
|
||
|
int b : 33; // expected-error{{size of bit-field 'b' exceeds size of its type (32 bits)}}
|
||
|
int c : (1 + 0.25); // expected-error{{expression is not an integer constant expression}}
|
||
|
int d : (int)(1 + 0.25);
|
||
|
};
|