Re: Spurious symbol 'foo' was not declared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 18, 2010 at 04:16:37PM -0400, Morten Welinder wrote:
> I think sparse issues a spurious warning about "static" for this program.
> Right?
> 
> Morten
> 
> static void foo (int);
> void foo (int a) { }
> 
> welinder@anemone:~> cgcc -Wall -c sss.c
> sss.c:2:6: warning: symbol 'foo' was not declared. Should it be static?
> sss.c:2: warning: ‘foo’ defined but not used

The second warning comes from gcc, I think.  But yes, the first warning
represents a long-standing sparse bug; "static" in the prototype doesn't
propagate to the definition.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux