https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90436
Jan Hubicka changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90436
--- Comment #4 from Marc Glisse ---
(side note not related to the redundant size checking)
It is surprising how, in the code from comment 2, adding v.reserve(1000) does
not help, it even slows the program down slightly here (yes, that's rather ha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90436
--- Comment #3 from Marc Glisse ---
// possibly assumes that ptrdiff_t and size_t have the same size
size_type
_M_check_len_one(const char* __str) const
{
ptrdiff_t __n = sizeof(_Tp);
ptrdiff_t __ms = max_s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90436
--- Comment #2 from Marc Glisse ---
(writing down some notes)
Calling
size_type
_M_check_len_one(const char* __s) const
{
if (max_size() - size() < 1)
__throw_length_error(__N(__s));
const size_type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90436
--- Comment #1 from Marc Glisse ---
Adding
if(size()>max_size())__builtin_unreachable())
sometimes helps, depending where you add it and in what exact form.