| 1 |
// RUN: %clang_cc1 -verify -std=c2y -ffreestanding %s |
| 2 |
// RUN: %clang_cc1 -verify -std=c23 -ffreestanding %s |
| 3 |
|
| 4 |
/* WG14 N3496: Clang 20 |
| 5 |
* Clarify the specification of the width macros |
| 6 |
* |
| 7 |
* C23 N2412 mandated a two's complement sign representation for integers, and |
| 8 |
* added *_WIDTH macros for all of the various integer types. There was |
| 9 |
* confusion as to whether BOOL_WIDTH specified the minimum number of bits or |
| 10 |
* an exact number of bits. N3496 clarified that it's an exact number of bits. |
| 11 |
*/ |
| 12 |
// expected-no-diagnostics |
| 13 |
|
| 14 |
#include <limits.h> |
| 15 |
|
| 16 |
static_assert(BOOL_WIDTH == 1); |
| 17 |
|