http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57937
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alexei Semenoff from comment #2)
> Why example above works with simple cout ?
> How cout is related with returning local or non local variable ?
Returning the address to a local variable is undefined. So it just happens to
work in that case.