[Bug libstdc++/79349] unused std::string is not optimized away in presense of a call

hiraditya at msn dot com gcc-bugzilla@gcc.gnu.org
Tue May 2 19:55:00 GMT 2017


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

AK <hiraditya at msn dot com> changed:

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

--- Comment #2 from AK <hiraditya at msn dot com> ---
The problem is exceptions. When I compile without exceptions (-fno-exceptions)
g++ does optimize this away and gives same output as clang. It seems clang++
compiles without exceptions by default and behaves like g++ when -fexceptions
is passed.


More information about the Gcc-bugs mailing list