This is the mail archive of the
mailing list for the GCC project.
Re: [v3] More noexcept -- 5th
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 20 Sep 2013 16:32:56 +0200 (CEST)
- Subject: Re: [v3] More noexcept -- 5th
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1309200904020 dot 10363 at stedding dot saclay dot inria dot fr> <523C3B4B dot 6050209 at oracle dot com> <alpine dot DEB dot 2 dot 10 dot 1309201602350 dot 20836 at stedding dot saclay dot inria dot fr> <523C58AE dot 1080801 at oracle dot com>
- Reply-to: libstdc++ at gcc dot gnu dot org
On Fri, 20 Sep 2013, Paolo Carlini wrote:
By the way, I would be curious at some point to actually see with my eyes the
effect of those optimizations in the assembly: is it easy to produce
examples? Even at say -O2?
If you use "if(noexcept(container.shrink_to_fit()))", you can easily cause
different code to be used. Now whether for regular code it somehow
produces fewer implicit try-catch or some optimization like that, I have
no idea. If it ever makes code worse, please beat the core- people who
required std::terminate with a screen showing the benchmarks (I keep
wanting to introduce -fno-abort -fno-terminate flags to turn those 2 calls
Note that I am still a proponent of noexcept(auto), if it can't be the
default. If someone feels like implementing it as an extension, we could
use it in the library.