https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103887

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Michal Kubecek from comment #4)
> As this is nicer than the original code, I guess I'll use it and hope it is
> not just a happy coincidence that it works.

It is not, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449#c6 (since GCC
4.9.0) for the commit which fixed the issue with __builtin_choose_expr and
__builtin_constant_p. Basically __builtin_constant_p(x) is forced to false if x
was not a constant expression. _Static_assert folding should be handled the
same way and that is what PR 79482 is about really.

Reply via email to