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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
The temporary it mentions is a temporary generated within the lambda to hold
the value "28", because we (wrongly) immediately decay the use of 'val' to its
constant value, so the temporary is out of scope after the lambda returns. 
Returning null doesn't seem worse to me, rather it will help people catch
undefined behavior more rapidly.  This is an important bug, certainly, but I
don't think it's a regression.

Reply via email to