Skip to content

remove __builtin_choose_expr usage as it is actually unnecessary and breaks c++#2925

Merged
kilograham merged 4 commits into
developfrom
choose-expr-unnecessary
May 12, 2026
Merged

remove __builtin_choose_expr usage as it is actually unnecessary and breaks c++#2925
kilograham merged 4 commits into
developfrom
choose-expr-unnecessary

Conversation

@kilograham
Copy link
Copy Markdown
Contributor

__builtin_choose_expr was added I think to prevent compiler outputting both sides of the IF, but it all the compilers we support (all the way back to GCC 6) correctly elide based on __builtin_constant_p anyway... I guess __builtin_choose_expr is more to avoid compilation errors on one branch vs to avoid code generation on that branch

@kilograham kilograham added this to the 2.2.1 milestone May 6, 2026
@kilograham kilograham requested a review from will-v-pi May 6, 2026 13:46
@will-v-pi will-v-pi linked an issue May 11, 2026 that may be closed by this pull request
@kilograham kilograham merged commit 4836053 into develop May 12, 2026
14 checks passed
@kilograham kilograham deleted the choose-expr-unnecessary branch May 12, 2026 16:07
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.

Compilation with float.h in a *.cpp file fails

2 participants