[Bug c++/123577] C++17: Unhelpful constexpr error message when array size exceeds 16 bytes

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 13 17:25:53 GMT 2026


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |55004
           Keywords|                            |diagnostic

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Anthony Cozzolino from comment #1)
> Note: I'm not sure if leaving ret uninitialized is actually a constexpr
> violation to begin with, but since that is being enforced in C++17 mode, it
> would be nice to have a proper error message.

It is in C++17. C++20 has different rules with respect to uninitialized and
constexpr.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
[Bug 55004] [meta-bug] constexpr issues


More information about the Gcc-bugs mailing list