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

Niels Möller nisse at
Mon Apr 18 09:30:04 CEST 2022

Paul Eggert <eggert at> 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 <assert.h>
  void foo(void) {int x = 1; assert(x);}

No warnings with gcc -Wall -c, but warns with gcc -Wall -DNDEBUG -c.

We currently don't use -Wall in gmp or mini-gmp Makefiles. And I suspect
no nightly builds try -DNDEBUG (since main gmp code doesn't use plain
assert, it's not that an interesting configuration). To do things
specifically for mini-gmp, I guess one could tweak the check-mini-gmp
make target, or the arguments passed to it in nightly builds.


Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.

More information about the gmp-bugs mailing list