https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104568
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Make it typedef int T[0]; constexpr bool foo () { auto p = new T[0]; delete p; return true; } constexpr bool a = foo (); so that it is constant evaluated always, doesn't need -Wall then, just -std=c++20 or -std=c++23.