[Bug c/25499] regression: bogus 'defined but not used' warning

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 20 02:27:00 GMT 2005



------- 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



More information about the Gcc-bugs mailing list