------- Comment #10 from mattias at virtutech dot se 2009-03-21 21:49 ------- Note that C++ objects need not be larger than 8 bytes to qualify for returning on the stack (and thus subject to this cleanup problem). Any class with a copy constructor, for example, seems to be affected. Try compiling:
struct A { A(); A(const A&); int x; }; A f() { return A(); } This is probably why methods returning string::reverse_iterator make the list. (http://www.agner.org/optimize/calling_conventions.pdf was useful for understanding this.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834