[Bug libstdc++/62187] std::string==const char* could compare sizes first

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 24 14:57:00 GMT 2017


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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
I was also confused when re-reading this PR, but if you check the current code,
we already start by computing the length of the char*... (I think the main
issue is when the string starts the same as the char*, terminating 0 included,
and then continues)


More information about the Gcc-bugs mailing list