Skip to content

[pull] master from php:master#842

Merged
pull[bot] merged 6 commits intoturkdevops:masterfrom
php:master
Apr 6, 2026
Merged

[pull] master from php:master#842
pull[bot] merged 6 commits intoturkdevops:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Apr 6, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

TimWolla and others added 6 commits April 6, 2026 14:46
There are several issues with this macro:

- It is incorrectly named: It's not an empty default case. It's an unreachable
  default case.
- It is hiding control flow in its definition, which can be confusing for
  humans and tools (such as Coccinelle) alike, because it looks like it would
  be a statement that belongs to the "current" case rather than opening a new
  one.

Since this macro is exactly as long as explicitly spelling out its definition
(excluding the useless `break;`), it is not even making the code any more
succinct.
These patterns are implicitly anchored, thus we must manually handle the
`default: ZEND_UNREACHABLE();` case. Also add a comment indicating that for
future changes.
…ing `bool` (#21649)

Changes done with Coccinelle:

    @r1 exists@
    identifier fn;
    typedef bool;
    symbol false;
    symbol true;
    @@

    bool fn ( ... )
    {
    ...
    return
    (
    - 0
    + false
    |
    - 1
    + true
    )
    ;
    }
@pull pull bot locked and limited conversation to collaborators Apr 6, 2026
@pull pull bot added the ⤵️ pull label Apr 6, 2026
@pull pull bot merged commit 19eabc6 into turkdevops:master Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants