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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
With -std=c++14 it started with r5-5013-g60813a463b1e1398, it was rejected
before the revision:

pr94219.cc: In function ‘constexpr A foo(U*)’:
pr94219.cc:13:1: error: body of constexpr function ‘constexpr A foo(U*)’ not a
return-statement
 }
 ^
pr94219.cc: At global scope:
pr94219.cc:7:17: error: ‘constexpr A foo(U*)’ called in a constant expression
   A a = foo(this); int y;
                 ^
pr94219.cc:17:1: error: non-constant condition for static assertion
 static_assert(u.y == 11, "");
 ^
pr94219.cc:18:1: error: non-constant condition for static assertion
 static_assert(u.a.x == 42, "");
 ^

Reply via email to