https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483
--- Comment #5 from John McFarlane ---
Here is an example of the real-world code causing this warning:
https://github.com/johnmcfarlane/cnl/blob/6d46b6cf10a998e3bdcc32557f202c8579b5717c/test/unit/scaled_int/to_chars.h#L60
It is converting a num
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483
Bug ID: 103483
Summary: constexpr basic_string triggers stringop-overread
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102303
Bug ID: 102303
Summary: optimizer elides -ftrapv overflow detection
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c+
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
--- Comment #9 from John McFarlane ---
And here is an ICE in 10.2:
struct a;
template class b;
template b()->b<>;
template using c = b;
static_assert(c{}
CL: g++ -v -std=c++2a source.cpp
Online: https://godbolt.org/z/54aTr6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
--- Comment #8 from John McFarlane ---
And this input can generate an ICE even with the -std=c++2a switch:
template class a;
template a()->a;
template <2> using c a;
static_assert(c{ }
CL: g++ -v -std=c++2a source.cpp
Online
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93297
John McFarlane changed:
What|Removed |Added
CC||john at mcfarlane dot name
--- Comment