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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2026-01-13
     Ever confirmed|0                           |1

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The fix for the code is simple though:
std::array<std::byte, N> ret{};

That is value initialize ret.

In C++17, uniniitialized variables are supposed to be rejected so this is
accepts invalid for <=16 too.  

C++20 allows uninitialized variables to begin with as long as they are fully
initialized at the end of the full constexpr expression.

Reply via email to