This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/23358] _Destroy doesn't optimize for scalar types
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2005 18:34:42 -0000
- Subject: [Bug libstdc++/23358] _Destroy doesn't optimize for scalar types
- References: <20050812180210.23358.tkho@tommykho.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From chris at bubblescope dot net 2005-08-12 18:34 -------
Yep, it's the extra template parameter which is confusing the compiler. If you have parameters it can't
deduce from the input to a function, they must be given explicitly, so in this case that function is just
ignored. This has been wrong since it was submitted (version 1.19 of the file). Removing that extra
template parameter is the right thing to do. I had a quick look at other functions submitted at the same
time and they are fine, so it's just a copy+paste bug I suspect :)
Hopefully gcc will eventually get clever enough to remove empty loops by itself, and then we won't need
these types of hacks, but for now this is the right patch to apply.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23358