[Bug c++/53990] wrong "optimisation": automatic variable doesn't removed at fuction exit

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 18 12:40:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53990

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-18 12:40:42 UTC ---
It's maybe a little confusing for beginners, until they learn how it works, but
it makes certain operations up to three times faster so it's a huge benefit.

All good quality compilers will perform the optimisation, but if you don't want
G++ to do it (and want your programs to be slower) you can use
-fno-elide-constructors



More information about the Gcc-bugs mailing list