This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25499] regression: bogus 'defined but not used' warning
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2005 02:27:37 -0000
- Subject: [Bug c/25499] regression: bogus 'defined but not used' warning
- References: <bug-25499-4536@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from joseph at codesourcery dot com 2005-12-20 02:27 -------
Subject: Re: New: regression: bogus 'defined but not used'
warning
On Tue, 20 Dec 2005, rusty at rustcorp dot com dot au wrote:
> 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
c-decl.c in 3.4 was part way through a rewrite and so is rather buggy.
Most problems associated with this are not safely fixable on 3.4 branch,
but are fixed in 4.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25499