Possibly an annoying test in configure

Arsen Arsenović arsen at gentoo.org
Mon Aug 21 17:31:40 CEST 2023


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
-- 
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 381 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20230821/3dad98d2/attachment.bin>


More information about the gmp-bugs mailing list