GMP 6.2.0 doesn't build on C89 compilers - Patch attached
Torbjörn Granlund
tg at gmplib.org
Thu May 7 07:47:26 UTC 2020
Colin Finck <colin at reactos.org> writes:
We build GMP as part of a GCC build for a build environment and have
just upgraded to GMP 6.2.0.
Unfortunately, this version fails to build using C89 compilers or under
Linux distributions that don't advertise C99 support. In particular, one
of our developers couldn't compile GMP 6.2.0 under Slackware 14.1 (see
https://jira.reactos.org/browse/ROSBE-164).
Fortunately, there is only one file in GMP 6.2.0 making use of C99-style
variable declarations inside a for loop. Patching these out fixes the bui=
ld.
A corresponding patch is attached.
I'd be glad to see this fixed upstream, so that we don't have to ship a
patched version of GMP.
We added a test configuration to the automated GMP testing setup.
It catches a few C89 discrepances in fact.
The GMP developers have in the past discussed moving to C99. I don't
recall that we decided to make the move yet, which means that
compile_powtab.c is not correct. (But would probably be a wise thing to
do for the next major release.)
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list