[Bug c/82520] Missing warning when stack addresses escape the current scope

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 21 09:27:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=63181
             Blocks|                            |90556

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #2)
> There are a number of classes of instances of this problem that GCC doesn't
> detect but arguably should and possibly could.  Examples include: pr69433,
> pr71924, and pr81811.   Detecting all of them may not be straightforward or
> even feasible but improving on the status quo certainly is possible.  This
> case does seem like one of the harder ones to catch.  Confirming with that
> caveat.

The rest of these would all go under -Wreturn-local-addr, so I'm assuming that
this one would, too.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90556
[Bug 90556] [meta-bug] bogus/missing -Wreturn-local-addr


More information about the Gcc-bugs mailing list