Possibly an annoying test in configure

Dennis Clarke dclarke at blastwave.org
Tue Aug 22 00:04:20 CEST 2023


On 8/21/23 11:31, Arsen Arsenović wrote:
> 
> Torbjörn Granlund <tg at gmplib.org> writes:
> 
>> Dennis Clarke <dclarke at blastwave.org> writes:
>>
>>    Pretty sure that should be "int main (void) { return 0; } ".
>>
>> Surely that is not how the implicit main() declaration looks?  A new
>> compiler warning is warranted.  So add (int argc, const char **argv)!
>> Oops, unused parameters, darn.  We need to make a fake dependency on
>> these unused parameters...
>>
>> Alternatively, we could develop GMP.
>>
>>    How hard can it be to patch that in the configure.ac autotools stuff?
>>
>> It is pointless to work around compiler idiosyncrasies without a plan,
>> and without clear indications that it solves a real problem.
> 
> These should be fixed upstream in Autoconf already:
> https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d
> 
> This is a somewhat well known change in Clang (and upcoming, though not
> current, GCC), and is also a change that was done in ISO C over twenty
> years ago.
> 
> We, as well as Fedora, and likely others have been fixing these in
> various programs for a while:
> https://wiki.gentoo.org/wiki/Modern_C_porting
> 
> Dennis, would you mind testing with Autoconf 2.72c to see if the issue
> persists?  You can fetch it from
> https://alpha.gnu.org/gnu/autoconf/autoconf-2.72c.tar.xz

This is not entirely off-topic for GMP/MPFR but certainly out on the
bitter edge. Maybe best to move this off to a maillist for autotools.

Thus, I will get onto that for a few systems. Likely :

     1) FreeBSD 14.0 ALPHA2 on the RISC-V rv64imafdc
     2) FreeBSD 14.0 ALPHA2 on aarch64
     3) Gentoo Linux on sparcv9
     4) other stuff running around me ... :)



--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional



More information about the gmp-bugs mailing list