This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/86013] std::vector::shrink_to_fit() could sometimes use realloc()
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Jun 2018 08:06:47 +0000
- Subject: [Bug libstdc++/86013] std::vector::shrink_to_fit() could sometimes use realloc()
- Auto-submitted: auto-generated
- References: <bug-86013-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86013
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I wonder if technically shrink_to_fit() is allowed to elide the shrinking? And
yes, I'm equally shocked about the need to copy!