[Bug c++/40970] Initialization of reference with temporary
--- Comment #1 from paolo dot carlini at oracle dot com 2009-08-05 12:25 --- This is just triggering undefined behavior: after the constructor call dim is bound to a temporary long created on the fly from the double _dim, which disappears by the time newValue is called. Nothing to do with std::valarray or whatelse. -- paolo dot carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40970
[Bug c++/40970] Initialization of reference with temporary
--- Comment #2 from paolo dot carlini at oracle dot com 2009-08-05 12:29 --- Oh, you just want a warning for this. Indeed, ICC spills one with -Wall. Maybe Manuel has an opinion... -- paolo dot carlini at oracle dot com changed: What|Removed |Added CC||manu at gcc dot gnu dot org Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40970
[Bug c++/40970] Initialization of reference with temporary
--- Comment #3 from paolo dot carlini at oracle dot com 2009-08-05 12:34 --- Eh, eh... *** This bug has been marked as a duplicate of 986 *** -- paolo dot carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40970