1 /* SPDX-License-Identifier: LGPL-2.1+ */
3 This file is part of systemd.
5 Copyright 2016 Zbigniew Jędrzejewski-Szmek
11 #include "time-util.h"
13 /* Print information about various types. Useful when diagnosing
14 * gcc diagnostics on an unfamiliar architecture. */
16 #pragma GCC diagnostic ignored "-Wtype-limits"
19 printf("%s → %zu bits%s\n", STRINGIFY(t), \
21 strstr(STRINGIFY(t), "signed") ? "" : \
22 ((t)-1 < (t)0 ? ", signed" : ", unsigned"));
29 big_enum_value = UINT64_C(1),
33 big_enum2_pos = UINT64_C(1),
34 big_enum2_neg = UINT64_C(-1),
44 info(long long unsigned);
46 info(__syscall_ulong_t);
47 info(__syscall_slong_t);
48 #endif // ifdef __GLIBC__
60 #endif // ifdef __GLIBC__
68 assert_cc(sizeof(enum BigEnum2) == 8);
69 printf("big_enum2_pos → %zu\n", sizeof(big_enum2_pos));
70 printf("big_enum2_neg → %zu\n", sizeof(big_enum2_neg));