[Bug c++/110493] 'is not a constant expression' for function-local static std::initializer_list with fsanitize=undefined

2023-06-30 Thread ed at catmur dot uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110493 --- Comment #4 from Ed Catmur --- Ah, thanks. So a workaround is something like: void f() { static auto a = {((bool*)&(int const&)0, std::string())}; } That's not too bad, then.

[Bug c++/110493] 'is not a constant expression' for function-local static std::initializer_list with fsanitize=undefined

2023-06-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110493 Andrew Pinski changed: What|Removed |Added Component|libstdc++ |c++ --- Comment #3 from Andrew Pinski