From: Bruno Haible Date: Mon, 6 Dec 2021 16:47:05 +0000 (+0100) Subject: intprops: Treat EDG-based compilers like Intel compilers. X-Git-Tag: v1.0~2544 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1c86f7f3ffa2fd7584df3be376a5ab6a45dc96da;p=gnulib.git intprops: Treat EDG-based compilers like Intel compilers. Reported by Ilya Kurdyukov in . * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based compilers. --- diff --git a/ChangeLog b/ChangeLog index bc8da213ee..52068d2aa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-12-06 Bruno Haible + + intprops: Treat EDG-based compilers like Intel compilers. + Reported by Ilya Kurdyukov in + . + * lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based + compilers. + 2021-12-05 Bruno Haible sigsegv: Fix build on some more embedded CPUs. diff --git a/lib/intprops.h b/lib/intprops.h index 3fe64e82e9..b36e0bbed9 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -249,11 +249,12 @@ /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for __builtin_sub_overflow_p and __builtin_mul_overflow_p. */ -#if defined __clang__ || defined __ICC +#if defined __clang__ || defined __ICC || defined __EDG__ /* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it - would presumably run afoul of Clang bug 16404. ICC 2021.1's - __builtin_add_overflow_p etc. are not treated as integral constant - expressions even when all arguments are. */ + would presumably run afoul of Clang bug 16404. In ICC 2021.1 and + the EDG-based MCST Elbrus LCC compiler, __builtin_add_overflow_p etc. + are not treated as integral constant expressions even when all + arguments are. */ # define _GL_HAS_BUILTIN_OVERFLOW_P 0 #elif defined __has_builtin # define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)