Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / C / C11 / n1356.c
blob104e197fc95b26d7f9338c65ede85240b2f261d6
1 // RUN: %clang_cc1 -verify %s
3 /* WG14 N1356: Yes
4 * _Bool bit-fields
5 */
7 // C does not allow the bit-width of a bit-field to exceed the width of the
8 // bit-field type, and _Bool is only required to be able to store 0 and 1
9 // (and thus is implicitly unsigned), which only requires a single bit.
10 #if __BOOL_WIDTH__ < __CHAR_BIT__
11 struct S {
12 _Bool b : __CHAR_BIT__; // expected-error {{width of bit-field 'b' (8 bits) exceeds the width of its type (1 bit)}}
14 #else
15 // expected-no-diagnostics
16 #endif