Possibly an annoying test in configure
Marc Glisse
marc.glisse at inria.fr
Tue Aug 22 10:30:48 CEST 2023
There are a number of direct uses in acinclude.m4 in GMP. Some are easy to
update (I just did a few). But others are tests to detect bugs in
compilers on esoteric platforms we may not have access to, and adding a
prototype to the function could change things enough that the testcase
would fail to trigger the bug.
On Mon, 21 Aug 2023, 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
--
Marc Glisse
More information about the gmp-bugs
mailing list