Skip to content

Fix compilation errors up until Clang 21.0#22141

Open
kocsismate wants to merge 3 commits into
php:masterfrom
kocsismate:clang21-fixes
Open

Fix compilation errors up until Clang 21.0#22141
kocsismate wants to merge 3 commits into
php:masterfrom
kocsismate:clang21-fixes

Conversation

@kocsismate
Copy link
Copy Markdown
Member

@kocsismate kocsismate commented May 24, 2026

  • The "pclmul" and "cldemote" CPU features are both only available on x86, and the __builtin_cpu_supports() checks in question fail on Clang, so they shouldn't even be tried to be run (similar fixes before: Fix build on Apple Clang 17+ #18629).
  • The res.h file in Lexbor contains some unterminated strings (e.g.
    {0x76, {0}, 0, 367, 0, 368}, {0x3b, "\xe2\x89\xaa\xe2\x83\x92", 6, 0, 0, 0},
    ), and a new compiler warning fails by default because of them. This needs to be suppressed.

- The "pclmul" and "cldemote" CPU features are both only available on x86-64, and the __builtin_cpu_supports() checks in question fail on Clang, so they shouldn't even be tried to be run (similar fixes before: php#18629).
- The res.h file in Lexbor contains some unterminated strings (e.g. https://github.com/php/php-src/blob/d58d3d2fd6c1cfa7e3489a9859eda63086af762f/ext/lexbor/lexbor/html/tokenizer/res.h#L203), and a new compiler warning fails by default because of them. This needs to be suppressed.
@ndossche
Copy link
Copy Markdown
Member

Changes in Zend header are fine.
Compile fails because the warning flag you added for Lexbor may be unknown by the compiler.

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