Fix testsuite for C23 `va_start` (#861)
authorJoseph Myers <jsm@polyomino.org.uk>
Thu, 24 Oct 2024 18:26:58 +0000 (18:26 +0000)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2024 18:26:58 +0000 (14:26 -0400)
commit0859f8431242d5adff21420b9cab538d2af527b5
tree8efb69c5431b4b421c0008eeb2c986b735e8e30f
parent8308bed5b2423878aa20d7884a99cf2e30b8daf7
Fix testsuite for C23 `va_start` (#861)

In the C23 revision of the C standard, `va_start` ignores its second
argument, which is no longer required (previously the last named
function parameter - which the compiler knows anyway, so it's
redundant information).

This has the consequence for the libffi testsuite, when making GCC
default to `-std=gnu23`, of making two tests fail with warnings about
an unused function argument (only passed to `va_start` and not
otherwise used).  Fix those test failures by explicitly casting the
argument to `void`.
testsuite/libffi.call/va_struct2.c
testsuite/libffi.call/va_struct3.c