http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2012-05-08 02:13:35 UTC --- (In reply to comment #9) > c++11 defines the lifetime of a temporary -- does it match C or g++'s > semantics > of compound literals or neither? C++98 and C++11 define the lifetime of a temporary as lasting until the end of the full-expression, unless its lifetime is extended by binding it to a reference. G++ treats compound literals as temporaries like any other.