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++/986] g++ misses warning for & on temporary



------- Comment #27 from pinskia at gcc dot gnu dot org  2010-08-27 22:21 -------
>This first one is inspired by the code I was working on:

Your two functions are well defined as the scope of the temp is only lost after
going out of scope.  So there is no references to a temp escaping unlike the
original example.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=986


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