[Bug c++/97256] auto function return different result

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 1 10:01:05 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97256

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, the lambda captures a local variable by value, and then when you invoke
the lambda it refers to a dead variable.


More information about the Gcc-bugs mailing list