Joy with new GCC 3.3 warnings -- HTF to shut them up?

Cook, Kelley (R.K.) kcook34@ford.com
Thu May 1 15:43:00 GMT 2003


>Previously one could shut up GCC complaining about unused file-scope
>variables by making them 'const', now with GCC 3.3 that doesn't work.
>
>So how is one suppose to quiet GCC about SCCS, $Id$, copyright[], and
>other identification strings?  BSD has a lot of:
>
>    #ifndef lint
>    static const char copyright[] =
>    "@(#) Copyright (c) 1992, 1993, 1994\n\
>        The Regents of the University of California.  All rights
>        reserved.\n";
>    static const char sccsid[] = "@(#)chflags.c   8.5 (Berkeley) 4/1/94";
>    #endif
>
>I tried adding "__attribute__((__unused__))" in various places in the
>definition, but that didn't work.
>

Probably because it should have been "__attribute__((unused))". :)

R. Kelley Cook
Ford Edison Project
Distributed Readiness and Project Assurance
313.337.5246
kcook34@ford.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030501/6225bb6e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4166 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030501/6225bb6e/attachment.bin>


More information about the Gcc mailing list