https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104966
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Created attachment 52641 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52641&action=edit Partially reduced preprocessed source for second issue -std=gnu++20 -Wall gives: 3.ii: In member function 'void std::__moneypunct_cache<_CharT, _Intl>::_M_cache(const std::locale&) [with _CharT = __gnu_cxx::character<unsigned int, long unsigned int>; bool _Intl = false]': 3.ii:37583:9: warning: array subscript 0 is outside array bounds of '__gnu_cxx::character<unsigned int, long unsigned int> [0]' [-Warray-bounds] 37583 | { __c1 = __c2; } | ^~~~ 3.ii:36040:22: note: referencing an object of size 0 allocated by 'void* operator new [](std::size_t)' 36040 | __positive_sign = new _CharT[_M_positive_sign_size]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3.ii:37583:9: warning: array subscript 0 is outside array bounds of '__gnu_cxx::character<unsigned int, long unsigned int> [0]' [-Warray-bounds] 37583 | { __c1 = __c2; } | ^~~~ 3.ii:36045:22: note: referencing an object of size 0 allocated by 'void* operator new [](std::size_t)' 36045 | __negative_sign = new _CharT[_M_negative_sign_size]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
