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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Shouldn't this be solvable in C++14 and later?
We still reject it:
error: ‘((y = 1), 6.2e-1)’ is not a constant expression
but I suppose with some hacking of cp/constexpr.c this could be handled.

constexpr double f1 (double x)
{
  int y = 0;
  return __builtin_frexp (x, &y);
}
constexpr int f2 (double x)
{
  int y = 0;
  __builtin_frexp (x, &y);
  return y;
}
constexpr double c1 = f1 (1.24);
constexpr int c2 = f2 (1.24);

Reply via email to