[Bug libstdc++/106175] std::prev and next should check for equality with std::begin

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 3 19:04:41 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106175

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> A segfault here is not acceptable for a language like C++.

Well no. This is how the language is defined. It is undefined which means you
should have a check before.


More information about the Gcc-bugs mailing list