]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fundamental: assume that intmax_t is the biggest integer 37442/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 May 2025 14:39:32 +0000 (16:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 May 2025 16:35:32 +0000 (18:35 +0200)
Allowing intmax_t to be narrower than some other type in the assert
is rather strange. By definition, it is the widest type.

Follow-up for c0239e5f113335f49328286698d4a9f13fed983d.

src/fundamental/macro-fundamental.h

index 54b3e6a6510d4c074be1dbe645191317af591480..40c84a2efd52d01ce83b998ccbdc9d5fa5a44769 100644 (file)
 #else
 #  define ABS(a) __builtin_imaxabs(a)
 #endif
-assert_cc(sizeof(intmax_t) <= sizeof(long long));
+assert_cc(sizeof(long long) == sizeof(intmax_t));
 
 #define IS_UNSIGNED_INTEGER_TYPE(type) \
         (__builtin_types_compatible_p(typeof(type), unsigned char) ||   \