[Bug c/43395] New: Gcc warns label as local variable
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 16 20:02:00 GMT 2010
[hjl@gnu-6 pr43379]$ cat y.c
void *foo(void)
{
lab:
return &&lab;
}
[hjl@gnu-6 pr43379]$ gcc -S y.c
y.c: In function ÂfooÂ:
y.c:4: warning: function returns address of local variable
[hjl@gnu-6 pr43379]$
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00704.html
--
Summary: Gcc warns label as local variable
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43395
More information about the Gcc-bugs
mailing list