This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53220] [4.7/4.8 Regression] g++ mis-compiles compound literals


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]