diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-03-31 21:30:31 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-03-31 21:30:31 +0100 |
commit | 207bf79d7f23a3883694578f431c08960c348e38 (patch) | |
tree | 95ebe0a942d710ca9a7eb0e922e458a37ecf6a02 /gcc/testsuite/gcc.dg/c99-stdint-1.c | |
parent | e49be8f7c371881733a0f9b0c7ecccef5232f10e (diff) | |
download | gcc-207bf79d7f23a3883694578f431c08960c348e38.zip gcc-207bf79d7f23a3883694578f431c08960c348e38.tar.gz gcc-207bf79d7f23a3883694578f431c08960c348e38.tar.bz2 |
re PR c/448 (<stdint.h>-related issues (C99 issues))
PR c/448
fixincludes:
* inclhack.def (newlib_stdint_1, newlib_stdint_2): New fixes.
* fixincl.x: Regenerate.
* tests/base/stdint.h: Update.
gcc:
* Makefile.in (USE_GCC_STDINT): Define.
(stmp-int-hdrs): Install stdint.h if applicable.
* c-common.c (CHAR16_TYPE): Define in terms of UINT_LEAST16_TYPE
if known.
(CHAR32_TYPE): Define in terms of UINT_LEAST32_TYPE if known.
(SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE, INT64_TYPE,
UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE,
INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
(c_common_nodes_and_builtins): Initialize
underlying_wchar_type_node. Do not initialize
signed_wchar_type_node or unsigned_wchar_type_node. Initialize
nodes for new types.
(c_stddef_cpp_builtins): Define macros for new types.
* c-common.h (CTI_SIGNED_WCHAR_TYPE, CTI_UNSIGNED_WCHAR_TYPE):
Remove.
(CTI_UNDERLYING_WCHAR_TYPE, CTI_SIG_ATOMIC_TYPE, CTI_INT8_TYPE,
CTI_INT16_TYPE, CTI_INT32_TYPE, CTI_INT64_TYPE, CTI_UINT8_TYPE,
CTI_UINT16_TYPE, CTI_UINT32_TYPE, CTI_UINT64_TYPE,
CTI_INT_LEAST8_TYPE, CTI_INT_LEAST16_TYPE, CTI_INT_LEAST32_TYPE,
CTI_INT_LEAST64_TYPE, CTI_UINT_LEAST8_TYPE, CTI_UINT_LEAST16_TYPE,
CTI_UINT_LEAST32_TYPE, CTI_UINT_LEAST64_TYPE, CTI_INT_FAST8_TYPE,
CTI_INT_FAST16_TYPE, CTI_INT_FAST32_TYPE, CTI_INT_FAST64_TYPE,
CTI_UINT_FAST8_TYPE, CTI_UINT_FAST16_TYPE, CTI_UINT_FAST32_TYPE,
CTI_UINT_FAST64_TYPE, CTI_INTPTR_TYPE, CTI_UINTPTR_TYPE): Define.
(signed_wchar_type_node, unsigned_wchar_type_node): Remove.
(underlying_wchar_type_node, sig_atomic_type_node, int8_type_node,
int16_type_node, int32_type_node, int64_type_node,
uint8_type_node, uint16_type_node, c_uint32_type_node,
c_uint64_type_node, int_least8_type_node, int_least16_type_node,
int_least32_type_node, int_least64_type_node,
uint_least8_type_node, uint_least16_type_node,
uint_least32_type_node, uint_least64_type_node,
int_fast8_type_node, int_fast16_type_node, int_fast32_type_node,
int_fast64_type_node, uint_fast8_type_node, uint_fast16_type_node,
uint_fast32_type_node, uint_fast64_type_node, intptr_type_node,
uintptr_type_node): Define.
* c-cppbuiltin.c (builtin_define_constants,
builtin_define_type_minmax): New.
(builtin_define_stdint_macros): Define more macros.
(c_cpp_builtins): Define more limit macros.
(type_suffix): New.
(builtin_define_type_max): Define in terms of
builtin_define_type_minmax. Remove is_long parameter. All
callers changed.
* config.gcc (use_gcc_stdint): Define.
(tm_file): Add glibc-stdint.h for targets using glibc or uClibc.
Add newlib-stdint.h for generic targets.
* config/glibc-stdint.h, config/newlib-stdint.h,
ginclude/stdint-gcc.h, ginclude/stdint-wrap.h: New.
* config/m32c/m32c.h (UINTPTR_TYPE): Define.
* config/score/score.h (UINTPTR_TYPE): Define.
* config/sol2.h (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE,
INT32_TYPE, INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE,
UINT64_TYPE, INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Define.
* config/spu/spu.h (STDINT_LONG32): Define.
* configure.ac (use_gcc_stdint): Substitute.
* configure: Regenerate.
* doc/cpp.texi (__SIG_ATOMIC_TYPE__, __INT8_TYPE__,
__INT16_TYPE__, __INT32_TYPE__, __INT64_TYPE__, __UINT8_TYPE__,
__UINT16_TYPE__, __UINT32_TYPE__, __UINT64_TYPE__,
__INT_LEAST8_TYPE__, __INT_LEAST16_TYPE__, __INT_LEAST32_TYPE__,
__INT_LEAST64_TYPE__, __UINT_LEAST8_TYPE__, __UINT_LEAST16_TYPE__,
__UINT_LEAST32_TYPE_, __UINT_LEAST64_TYPE__, __INT_FAST8_TYPE__,
__INT_FAST16_TYPE__, __INT_FAST32_TYPE__, __INT_FAST64_TYPE__,
__UINT_FAST8_TYPE__, __UINT_FAST16_TYPE__, __UINT_FAST32_TYPE__,
__UINT_FAST64_TYPE__, __INTPTR_TYPE__, __UINTPTR_TYPE__,
__WINT_MAX__, __SIZE_MAX__, __PTRDIFF_MAX__, __UINTMAX_MAX__,
__SIG_ATOMIC_MAX__, __INT8_MAX__, __INT16_MAX__, __INT32_MAX__,
__INT64_MAX__, __UINT8_MAX__, __UINT16_MAX__, __UINT32_MAX__,
__UINT64_MAX__, __INT_LEAST8_MAX__, __INT_LEAST16_MAX__,
__INT_LEAST32_MAX__, __INT_LEAST64_MAX__, __UINT_LEAST8_MAX__,
__UINT_LEAST16_MAX__, __UINT_LEAST32_MAX__, __UINT_LEAST64_MAX__,
__INT_FAST8_MAX__, __INT_FAST16_MAX__, __INT_FAST32_MAX__,
__INT_FAST64_MAX__, __UINT_FAST8_MAX__, __UINT_FAST16_MAX__,
__UINT_FAST32_MAX__, __UINT_FAST64_MAX__, __INTPTR_MAX__,
__UINTPTR_MAX__, __WCHAR_MIN__, __WINT_MIN__, __SIG_ATOMIC_MIN__,
__INT8_C, __INT16_C, __INT32_C, __INT64_C, __UINT8_C, __UINT16_C,
__UINT32_C, __UINT64_C, __INTMAX_C, __UINTMAX_C): Document.
* doc/tm.texi (SIG_ATOMIC_TYPE, INT8_TYPE, INT16_TYPE, INT32_TYPE,
INT64_TYPE, UINT8_TYPE, UINT16_TYPE, UINT32_TYPE, UINT64_TYPE,
INT_LEAST8_TYPE, INT_LEAST16_TYPE, INT_LEAST32_TYPE,
INT_LEAST64_TYPE, UINT_LEAST8_TYPE, UINT_LEAST16_TYPE,
UINT_LEAST32_TYPE, UINT_LEAST64_TYPE, INT_FAST8_TYPE,
INT_FAST16_TYPE, INT_FAST32_TYPE, INT_FAST64_TYPE,
UINT_FAST8_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE,
UINT_FAST64_TYPE, INTPTR_TYPE, UINTPTR_TYPE): Document.
gcc/testsuite:
* lib/target-supports.exp (check_effective_target_stdint_types):
Update comment.
(check_effective_target_inttypes_types): New.
* gcc.dg/c99-stdint-1.c, gcc.dg/c99-stdint-2.c,
gcc.dg/c99-stdint-3.c, gcc.dg/c99-stdint-4.c,
gcc.dg/c99-stdint-5.c, gcc.dg/c99-stdint-6.c: New tests.
From-SVN: r145372
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-stdint-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-stdint-1.c | 265 |
1 files changed, 265 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-1.c b/gcc/testsuite/gcc.dg/c99-stdint-1.c new file mode 100644 index 0000000..5dcac41 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-stdint-1.c @@ -0,0 +1,265 @@ +/* Verify that <stdint.h> is present and follows the C99 requirements. + If this test fails because of the header being missing on a + particular target, this indicates GCC has not been correctly + configured regarding what version of <stdint.h> to install or what + the <stdint.h> types are on that target. If GCC is wrapping a + system copy of the header and some tests fail because of bugs in + that copy, they should be fixed with fixincludes (and the bugs + reported to maintainer of that copy if still present in the latest + version). */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999 -pedantic-errors -fhosted" } */ + +#include <limits.h> +#include <stdint.h> +/* This and the later SIG_ATOMIC_* tests should be appropriately + conditioned for any freestanding targets with no <signal.h>. */ +#include <signal.h> + +/* Note that some of these conditions assume two's complement and no + padding bits; GCC only supports two's complement, and no supported + target has padding bits in any integer type of the standard + widths. */ +#define CHECK_SIGNED(TYPE) \ + do { TYPE a; int b[(TYPE)-1 < 0 ? 1 : -1]; } while (0) +#define CHECK_UNSIGNED(TYPE) \ + do { TYPE a; int b[(TYPE)-1 < 0 ? -1 : 1]; } while (0) +#define CHECK_WIDTH_EQUALS(TYPE, WIDTH) \ + do { int a[sizeof(TYPE) * CHAR_BIT == (WIDTH) ? 1 : -1]; } while (0) +#define CHECK_WIDTH_AT_LEAST(TYPE, WIDTH) \ + do { int a[sizeof(TYPE) * CHAR_BIT >= (WIDTH) ? 1 : -1]; } while (0) +#define CHECK_WIDTH_ORDER(TYPE1, TYPE2) \ + do { int a[sizeof(TYPE2) >= sizeof(TYPE1) ? 1 : -1]; } while (0) +#define CHECK_EXPR_TYPE(TYPE, EXPR) \ + do { __typeof__(EXPR) a; __typeof__((TYPE)0 + 0) *b = &a; } while (0) +#define UNSIGNED_MAX_COND(TYPE, EXPR) \ + ((EXPR) == (TYPE)-1) +#define SIGNED_MIN_MAX_COND(TYPE, MIN, MAX) \ + ((MIN) == -(MAX)-1 \ + && ((MAX) & 1) \ + && ((((MAX) >> 1) + 1) >> (sizeof(TYPE) * CHAR_BIT - 2)) == 1) +#define MIN_MAX_COND(TYPE, MIN, MAX) \ + ((TYPE)-1 < 0 \ + ? SIGNED_MIN_MAX_COND(TYPE, (MIN), (MAX)) \ + : ((MIN) == 0 && UNSIGNED_MAX_COND(TYPE, (MAX)))) +#define CHECK_SIGNED_LIMITS(TYPE, MIN, MAX) \ + CHECK_SIGNED(TYPE); \ + CHECK_EXPR_TYPE(TYPE, (MIN)); \ + CHECK_EXPR_TYPE(TYPE, (MAX)); \ + do { int a[SIGNED_MIN_MAX_COND(TYPE, (MIN), (MAX)) ? 1 : -1]; } while (0) +#define CHECK_SIGNED_LIMITS_2(TYPE, MIN, MAX, MINBD, MAXBD) \ + CHECK_SIGNED(TYPE); \ + CHECK_EXPR_TYPE(TYPE, (MIN)); \ + CHECK_EXPR_TYPE(TYPE, (MAX)); \ + do { int a[(SIGNED_MIN_MAX_COND(TYPE, (MIN), (MAX)) \ + && (MIN) <= (MINBD) \ + && (MAX) >= (MAXBD)) ? 1 : -1]; } while (0) +#define CHECK_UNSIGNED_LIMITS(TYPE, MAX) \ + CHECK_UNSIGNED(TYPE); \ + CHECK_EXPR_TYPE(TYPE, (MAX)); \ + do { int a[UNSIGNED_MAX_COND(TYPE, (MAX)) ? 1 : -1]; } while (0) +#define CHECK_UNSIGNED_LIMITS_2(TYPE, MAX, MAXBD) \ + CHECK_UNSIGNED(TYPE); \ + CHECK_EXPR_TYPE(TYPE, (MAX)); \ + do { int a[(UNSIGNED_MAX_COND(TYPE, (MAX)) \ + && (MAX) >= (MAXBD)) ? 1 : -1]; } while (0) +#define CHECK_LIMITS_2(TYPE, MIN, MAX, SMINBD, SMAXBD, UMAXBD) \ + do { int a[(MIN_MAX_COND(TYPE, (MIN), (MAX)) \ + && ((TYPE)-1 < 0 \ + ? ((MIN) <= (SMINBD) && (MAX) >= (SMAXBD)) \ + : (MAX) >= (UMAXBD))) ? 1 : -1]; } while (0) +#define CHECK_CONSTS(TYPE, MACRO) \ + CHECK_EXPR_TYPE(TYPE, MACRO(01)); \ + CHECK_EXPR_TYPE(TYPE, MACRO(2)); \ + CHECK_EXPR_TYPE(TYPE, MACRO(0x3)); \ + do { int a[(MACRO(12) == 12 \ + && MACRO(012) == 012 \ + && MACRO(0x12) == 0x12) ? 1 : -1]; } while (0); + +void +test_exact (void) +{ +#ifdef INT8_MIN + CHECK_WIDTH_EQUALS(int8_t, 8); + CHECK_SIGNED_LIMITS(int8_t, INT8_MIN, INT8_MAX); +#else + CHECK_WIDTH_AT_LEAST(int_least8_t, 9); +#endif +#ifdef INT16_MIN + CHECK_WIDTH_EQUALS(int16_t, 16); + CHECK_SIGNED_LIMITS(int16_t, INT16_MIN, INT16_MAX); +#else + CHECK_WIDTH_AT_LEAST(int_least8_t, 17); +#endif +#ifdef INT32_MIN + CHECK_WIDTH_EQUALS(int32_t, 32); + CHECK_SIGNED_LIMITS(int32_t, INT32_MIN, INT32_MAX); +#else + CHECK_WIDTH_AT_LEAST(int_least8_t, 33); +#endif +#ifdef INT64_MIN + CHECK_WIDTH_EQUALS(int64_t, 64); + CHECK_SIGNED_LIMITS(int64_t, INT64_MIN, INT64_MAX); +#else + CHECK_WIDTH_AT_LEAST(int_least8_t, 65); +#endif +#ifdef UINT8_MAX + CHECK_WIDTH_EQUALS(uint8_t, 8); + CHECK_UNSIGNED_LIMITS(uint8_t, UINT8_MAX); +#else + CHECK_WIDTH_AT_LEAST(uint_least8_t, 9); +#endif +#ifdef UINT16_MAX + CHECK_WIDTH_EQUALS(uint16_t, 16); + CHECK_UNSIGNED_LIMITS(uint16_t, UINT16_MAX); +#else + CHECK_WIDTH_AT_LEAST(uint_least8_t, 17); +#endif +#ifdef UINT32_MAX + CHECK_WIDTH_EQUALS(uint32_t, 32); + CHECK_UNSIGNED_LIMITS(uint32_t, UINT32_MAX); +#else + CHECK_WIDTH_AT_LEAST(uint_least8_t, 33); +#endif +#ifdef UINT64_MAX + CHECK_WIDTH_EQUALS(uint64_t, 64); + CHECK_UNSIGNED_LIMITS(uint64_t, UINT64_MAX); +#else + CHECK_WIDTH_AT_LEAST(uint_least8_t, 65); +#endif +} + +void +test_least (void) +{ + CHECK_WIDTH_AT_LEAST(int_least8_t, 8); + CHECK_WIDTH_ORDER(int_least8_t, int_fast8_t); + CHECK_SIGNED_LIMITS(int_least8_t, INT_LEAST8_MIN, INT_LEAST8_MAX); + CHECK_WIDTH_AT_LEAST(int_least16_t, 16); + CHECK_WIDTH_ORDER(int_least16_t, int_fast16_t); + CHECK_SIGNED_LIMITS(int_least16_t, INT_LEAST16_MIN, INT_LEAST16_MAX); + CHECK_WIDTH_AT_LEAST(int_least32_t, 32); + CHECK_WIDTH_ORDER(int_least32_t, int_fast32_t); + CHECK_SIGNED_LIMITS(int_least32_t, INT_LEAST32_MIN, INT_LEAST32_MAX); + CHECK_WIDTH_AT_LEAST(int_least64_t, 64); + CHECK_WIDTH_ORDER(int_least64_t, int_fast64_t); + CHECK_SIGNED_LIMITS(int_least64_t, INT_LEAST64_MIN, INT_LEAST64_MAX); + CHECK_WIDTH_AT_LEAST(uint_least8_t, 8); + CHECK_WIDTH_ORDER(uint_least8_t, uint_fast8_t); + CHECK_UNSIGNED_LIMITS(uint_least8_t, UINT_LEAST8_MAX); + CHECK_WIDTH_AT_LEAST(uint_least16_t, 16); + CHECK_WIDTH_ORDER(uint_least16_t, uint_fast16_t); + CHECK_UNSIGNED_LIMITS(uint_least16_t, UINT_LEAST16_MAX); + CHECK_WIDTH_AT_LEAST(uint_least32_t, 32); + CHECK_WIDTH_ORDER(uint_least32_t, uint_fast32_t); + CHECK_UNSIGNED_LIMITS(uint_least32_t, UINT_LEAST32_MAX); + CHECK_WIDTH_AT_LEAST(uint_least64_t, 64); + CHECK_WIDTH_ORDER(uint_least64_t, uint_fast64_t); + CHECK_UNSIGNED_LIMITS(uint_least64_t, UINT_LEAST64_MAX); +} + +void +test_fast (void) +{ + CHECK_WIDTH_AT_LEAST(int_fast8_t, 8); + CHECK_SIGNED_LIMITS(int_fast8_t, INT_FAST8_MIN, INT_FAST8_MAX); + CHECK_WIDTH_AT_LEAST(int_fast16_t, 16); + CHECK_SIGNED_LIMITS(int_fast16_t, INT_FAST16_MIN, INT_FAST16_MAX); + CHECK_WIDTH_AT_LEAST(int_fast32_t, 32); + CHECK_SIGNED_LIMITS(int_fast32_t, INT_FAST32_MIN, INT_FAST32_MAX); + CHECK_WIDTH_AT_LEAST(int_fast64_t, 64); + CHECK_SIGNED_LIMITS(int_fast64_t, INT_FAST64_MIN, INT_FAST64_MAX); + CHECK_WIDTH_AT_LEAST(uint_fast8_t, 8); + CHECK_UNSIGNED_LIMITS(uint_fast8_t, UINT_FAST8_MAX); + CHECK_WIDTH_AT_LEAST(uint_fast16_t, 16); + CHECK_UNSIGNED_LIMITS(uint_fast16_t, UINT_FAST16_MAX); + CHECK_WIDTH_AT_LEAST(uint_fast32_t, 32); + CHECK_UNSIGNED_LIMITS(uint_fast32_t, UINT_FAST32_MAX); + CHECK_WIDTH_AT_LEAST(uint_fast64_t, 64); + CHECK_UNSIGNED_LIMITS(uint_fast64_t, UINT_FAST64_MAX); +} + +void +test_ptr (void) +{ +#ifdef INTPTR_MIN + CHECK_SIGNED_LIMITS_2(intptr_t, INTPTR_MIN, INTPTR_MAX, -0x7fff, 0x7fff); +#endif +#ifdef UINTPTR_MAX + CHECK_UNSIGNED_LIMITS_2(uintptr_t, UINTPTR_MAX, 0xffffU); +#endif +} + +void +test_max (void) +{ + CHECK_WIDTH_AT_LEAST(intmax_t, 64); + CHECK_WIDTH_ORDER(long long, intmax_t); + CHECK_WIDTH_ORDER(int_fast8_t, intmax_t); + CHECK_WIDTH_ORDER(int_fast16_t, intmax_t); + CHECK_WIDTH_ORDER(int_fast32_t, intmax_t); + CHECK_WIDTH_ORDER(int_fast64_t, intmax_t); + CHECK_SIGNED_LIMITS(intmax_t, INTMAX_MIN, INTMAX_MAX); + CHECK_WIDTH_AT_LEAST(uintmax_t, 64); + CHECK_WIDTH_ORDER(unsigned long long, uintmax_t); + CHECK_WIDTH_ORDER(uint_fast8_t, uintmax_t); + CHECK_WIDTH_ORDER(uint_fast16_t, uintmax_t); + CHECK_WIDTH_ORDER(uint_fast32_t, uintmax_t); + CHECK_WIDTH_ORDER(uint_fast64_t, uintmax_t); + CHECK_UNSIGNED_LIMITS(uintmax_t, UINTMAX_MAX); +} + +void +test_misc_limits (void) +{ + CHECK_SIGNED_LIMITS_2(__PTRDIFF_TYPE__, PTRDIFF_MIN, PTRDIFF_MAX, -65535L, 65535L); + CHECK_LIMITS_2(sig_atomic_t, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, -127, 127, 255); + CHECK_UNSIGNED_LIMITS_2(__SIZE_TYPE__, SIZE_MAX, 65535U); + CHECK_LIMITS_2(__WCHAR_TYPE__, WCHAR_MIN, WCHAR_MAX, -127, 127, 255); + CHECK_LIMITS_2(__WINT_TYPE__, WINT_MIN, WINT_MAX, -32767, 32767, 65535); +} + +void +test_constants (void) +{ + CHECK_CONSTS(int_least8_t, INT8_C); + CHECK_CONSTS(int_least16_t, INT16_C); + CHECK_CONSTS(int_least32_t, INT32_C); + CHECK_CONSTS(int_least64_t, INT64_C); + CHECK_CONSTS(intmax_t, INTMAX_C); + CHECK_CONSTS(uint_least8_t, UINT8_C); + CHECK_CONSTS(uint_least16_t, UINT16_C); + CHECK_CONSTS(uint_least32_t, UINT32_C); + CHECK_CONSTS(uint_least64_t, UINT64_C); + CHECK_CONSTS(uintmax_t, UINTMAX_C); +#if INT8_C(12) != 12 +#error "INT8_C not usable in #if" +#endif +#if INT16_C(12) != 12 +#error "INT16_C not usable in #if" +#endif +#if INT32_C(12) != 12 +#error "INT32_C not usable in #if" +#endif +#if INT64_C(12) != 12 +#error "INT64_C not usable in #if" +#endif +#if INTMAX_C(12) != 12 +#error "INTMAX_C not usable in #if" +#endif +#if UINT8_C(12) != 12 +#error "UINT8_C not usable in #if" +#endif +#if UINT16_C(12) != 12 +#error "UINT16_C not usable in #if" +#endif +#if UINT32_C(12) != 12 +#error "UINT32_C not usable in #if" +#endif +#if UINT64_C(12) != 12 +#error "UINT64_C not usable in #if" +#endif +#if UINTMAX_C(12) != 12 +#error "UINTMAX_C not usable in #if" +#endif +} |