This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Teach Configure and cflags.SH about C99
authorH.Merijn Brand <perl5@tux.freedom.nl>
Fri, 29 Oct 2021 15:35:45 +0000 (17:35 +0200)
committerH.Merijn Brand <perl5@tux.freedom.nl>
Fri, 29 Oct 2021 15:35:45 +0000 (17:35 +0200)
commit1d83e14814c74a677a2a6c4faa90b7551f2c4d19
treedda048c6ea5d644c5140294624bd7d74dc5ce655
parent08c156fec0afa48912a642de45c58d67be21a375
Teach Configure and cflags.SH about C99
Test declarations after statement in Configure's C99 probe code

Probe to see whether we need -std=gnu99 or -std=c99 to get C99 code to
compile. In cflags.SH, remove code that added gcc warning flags that were
compatible with C89 but are not compatible with C99.

Also ensure that the relevant failure error message is output even with
Configure's -s flag, as we shouldn't stay silent for a message that causes
Configure default to aborting.

With these changes, Configure will fail the C99 probe test if passed
-Accflags="-Werror=declaration-after-statement" or
-Accflags="-Werror=long-long"

Backport of 0c7be120244c1a6aae9b1ae30124265bcb8184da
        and d34aca5e9e57e3f0b5d25d451759237b40647664
U/perl/gccvers.U