Re: clang warning about mini-gmp.c when used in Emacs

2022-04-18 Thread Paul Eggert
On 4/14/22 22:29, Niels Möller wrote: 1. Is the void cast really needed? Yes, I think so. Various compilers complain if a statement 'E;' has an expression E without side effects. The standard way to pacify them is to cast E to void. See, for example,

Re: clang warning about mini-gmp.c when used in Emacs

2022-04-18 Thread Niels Möller
Paul Eggert writes: > Mattias Engdegård reported that the Emacs master source currently > generates the following warning when Emacs is built with mini-gmp.c > under Clang 13: Probably not that compiler specific. Minimal example: #include void foo(void) {int x = 1; assert(x);} No

Re: clang warning about mini-gmp.c when used in Emacs

2022-04-18 Thread Niels Möller
Vincent Lefevre writes: >> 1. Is the void cast really needed? Corresponding macros in gmp-impl.h >> are defined like >> >> #if WANT_ASSERT >> #define ASSERT_CARRY(expr) ASSERT_ALWAYS ((expr) != 0) >> #define ASSERT_NOCARRY(expr) ASSERT_ALWAYS ((expr) == 0) >> #else >> #define