From 1521e294dfd5928a266b3b678c63324b0200ef24 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 27 Feb 2019 19:19:28 -0500 Subject: define without overflow --- src/limits/LLONG_MIN.c | 2 +- src/stdint/INTMAX_MIN.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/limits/LLONG_MIN.c b/src/limits/LLONG_MIN.c index a28952fe..39986c4c 100644 --- a/src/limits/LLONG_MIN.c +++ b/src/limits/LLONG_MIN.c @@ -1,5 +1,5 @@ #include -#define LLONG_MIN (-9223372036854775808LL) +#define LLONG_MIN (-LLONG_MAX - 1LL) /* MIN: -9223372036854775807 */ /** minimum value of a type(long long int) **/ diff --git a/src/stdint/INTMAX_MIN.c b/src/stdint/INTMAX_MIN.c index 240d40b6..632b7ff0 100644 --- a/src/stdint/INTMAX_MIN.c +++ b/src/stdint/INTMAX_MIN.c @@ -1,5 +1,5 @@ #include -#define INTMAX_MIN (-9223372036854775808LL) +#define INTMAX_MIN (-INTMAX_MAX - 1LL) /* STDC(199901) -- cgit v1.2.1