Skip to content

Conversation

@petk
Copy link
Member

@petk petk commented May 12, 2024

By default compilers may not treat attribute warnings as errors when encountering an unknown __attribute__, unless some error option is provided (-Werror=attributes, -Werror...). This fixes the check and wraps it into a separate M4 macro to be extendable in the future if needed. It checks if conftest.err file was generated by the compilation check when warnings appear. Also, PHP check is a bit customized by using __alignof__ keyword, so it is left in there for now to not break existing checks.

By default compilers may not treat attribute warnings as errors when
encountering an unknown __attribute__, unless some error option is
provided (-Werror=attributes, -Werror...). This fixes the check and
wraps it into a separate M4 macro to be extendable in the future if
needed. It checks if conftest.err file was generated by the compilation
check when warnings appear. Also, PHP check is a bit customized by using
__alignof__ keyword, so it is left in there for now to not break
existing checks.
@petk petk merged commit bc09cd2 into php:master May 19, 2024
@petk petk deleted the patch-aligned-attribute-check branch May 19, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants