[PATCH] Fix PR43379
Joseph S. Myers
joseph@codesourcery.com
Tue Mar 16 21:02:00 GMT 2010
On Tue, 16 Mar 2010, H.J. Lu wrote:
> We are warning return of label as local variable. This patch fixes it,.
Are you sure this is a bug? Returning the address of a local label seems
exactly as problematic as returning the address of a local variable; the
diagnostic should say "label" not "variable", and it should be possible to
disable it, but the uses of doing so are fairly specialized and
non-portable in both cases (reporting addresses of particular code in a
function, or of a stack location from a function call); you can't jump to
the returned address of a label, or dereference the returned address of a
variable.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list