This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25499] New: regression: bogus 'defined but not used' warning
- From: "rusty at rustcorp dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2005 02:23:02 -0000
- Subject: [Bug c/25499] New: regression: bogus 'defined but not used' warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
static int foo(void) { return 7; }
int main()
{
int foo(void);
return foo();
}
rusty@chopin:/tmp$ /usr/bin/gcc-3.4 -Wall -c foo.c
foo.c:1: warning: 'foo' defined but not used
rusty@chopin:/tmp$ /usr/bin/gcc-3.4 --version
gcc-3.4 (GCC) 3.4.5 (Debian 3.4.5-1)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
rusty@chopin:/tmp$ /usr/bin/gcc-3.2 -Wall -c foo.c
rusty@chopin:/tmp$ /usr/bin/gcc-3.3 -Wall -c foo.c
rusty@chopin:/tmp$ /usr/bin/gcc-4.0 -Wall -c foo.c
rusty@chopin:/tmp$
--
Summary: regression: bogus 'defined but not used' warning
Product: gcc
Version: 3.4.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rusty at rustcorp dot com dot au
GCC host triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25499