[Bug c++/49974] missing -Wreturn-local-addr for indirectly returning reference to local/temporary

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 21 11:57:00 GMT 2018


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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|missing warning for         |missing -Wreturn-local-addr
                   |indirectly returning        |for indirectly returning
                   |reference to                |reference to
                   |local/temporary             |local/temporary

--- Comment #14 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #13)
> Yes, I think so. The bug is returning a reference (indirectly) bound to a
> local, so I don't see a reason to have a different warning.

ok, updating title


More information about the Gcc-bugs mailing list