Skip to content

Conversation

nwc10
Copy link
Contributor

@nwc10 nwc10 commented Oct 6, 2021

Perl has changed to permitting some C99 features, particularly mixed declarations and code.

For blead, adding -Werror=declaration-after-statement unconditionally to gcc or clang's flags will break the build. Hence only do it for v5.35.4 and earlier.

See Perl/perl5#19172

Perl v5.35.5 now uses some C99 features. This means that Perl's headers now
contain some code with mixed declarations and code.

Earlier versions of Perl support long obsolete compilers that are strict in
rejecting certain C99 features, particularly mixed declarations and code,
hence it still makes sense to audit that our code does not violate this.
However, doing this is now only possible on these earlier versions of Perl,
hence only add -Werror=declaration-after-statement for 5.035004 and earlier.
@nwc10 nwc10 mentioned this pull request Oct 6, 2021
@nwc10 nwc10 marked this pull request as ready for review October 13, 2021 07:18
@demerphq demerphq merged commit 6356df0 into Sereal:master Jan 31, 2022
@nwc10 nwc10 deleted the perl-C99 branch June 7, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants