28 lines · c
1// RUN: %clang_cc1 -verify -std=c23 -ffreestanding %s2 3/* WG14 N2412: Clang 144 * Two's complement sign representation5 */6// expected-no-diagnostics7 8#include <limits.h>9 10// GH117348 -- BOOL_WIDTH was accidentally expanding to the number of bits in11// the object representation (8) rather than the number of bits in the value12// representation (1).13static_assert(BOOL_WIDTH == 1);14 15// Validate the other macro requirements.16static_assert(CHAR_WIDTH == SCHAR_WIDTH);17static_assert(CHAR_WIDTH == UCHAR_WIDTH);18static_assert(CHAR_WIDTH == CHAR_BIT);19 20static_assert(USHRT_WIDTH >= 16);21static_assert(UINT_WIDTH >= 16);22static_assert(ULONG_WIDTH >= 32);23static_assert(ULLONG_WIDTH >= 64);24static_assert(BITINT_MAXWIDTH >= ULLONG_WIDTH);25 26static_assert(MB_LEN_MAX >= 1);27 28