[Bug c/66963] __builtin_constant_p and __builtin_choose_expr do not agree on what is a constexpr with -O2
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 21 23:26:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66963
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I thought this is documented somewhere but __builtin_choose_expr only really
> accept constant literals and not constexprs.
And the main reason is the __builtin_choose_expr chooses the expression before
semantics analysis happens so the first argument needs to be a constant
literal.
More information about the Gcc-bugs
mailing list