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

--- Comment #8 from Andi Kleen <andi-gcc at firstfloor dot org> ---
__builtin_constant_p does not cover variable range information, which is what
we're looking for here to prevent security bugs.

Also in my experience these explicit expressions tend to be somewhat fragile
and is not well specified.  It has to assume that the optimizer does specific
operations which are nowhere guaranteed.

An explicit builtin could be much tighter defined.

Reply via email to