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

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Thank you for the suggestion.

Storing values via pointers is not C++ 14 specific so the answer to your
question is that having the builtins be treated as constexpr would be useful in
both C++ 11 and C++ 14 modes.  The modified example below should help explain
it:

constexpr int mul (int x, int y, int z = 0)
{
  return __builtin_mul_overflow *(x, y, &z) ? 0 : z;
}

constexpr int z = mul (1234, 5678);

Reply via email to