GCC warnings for unused global variables

Richard Henderson rth@redhat.com
Thu May 1 00:22:00 GMT 2003


On Wed, Apr 30, 2003 at 07:47:30PM -0400, Alexander Kabaev wrote:
> % what `which ls`
> /bin/ls:
>          Copyright (c) 1989, 1993, 1994
>         termcap.c       8.1 (Berkeley) 6/4/93
>         strftime.c      7.38
>         localtime.c     7.57
>         asctime.c       7.7
>         rec_seq.c       8.3 (Berkeley) 7/14/94
>         key_call.c      1.25    94/04/24 SMI
> 
> Does #ident allow that?

Yes.  For ELF this normally winds up in the .comment section.
Of course, this section is removed by strip, so it won't
*necessarily* be there, but ...

> Anyway, my question was about boatload of
> third-party software, which normally should not be modified locally.
> const static rcsid's are very common.

Then you'll have to ignore the warning.


r~



More information about the Gcc mailing list