devin@boulder.Colorado.EDU (Yampalimardilor) (06/28/91)
We're using AT&T C++ 2.0 and RCS, and placing a line in the .C files similar to static char *RCSid = "$Header$"; to allow the use of ident to identify which .C files are used in an executable. The compiler complains: "filename.C", line 1: warning: ::RCSid defined but not used This is pretty harmless, but I'd like to get it to shut up if possible. Is it possible? Advthanksance. -Devin -- Devin Hooker (RP90) DoD #0034 "It's being both that's a bitch." "Performing on a stool we've a sight to make you drool Seven virgins and a mule. Keep it cool. Keep it cool." -ELP
jk@cs.man.ac.uk (John Kewley ICL) (06/28/91)
const static char* const SCCS_id() { return("%W% %G% Copyright 1990 ICL"); }; /* SCCS_id */ or const static char* const RCS_id() { return("$Header"); }; /* RCS_id */ -- J.K. John M. Kewley, ICL, Wenlock Way, West Gorton, Manchester. M12 5DR Tel: (+44) 61 223 1301 X2138 Email: jk@fiveg.icl.co.uk or jk@cs.man.ac.uk
glenn@bitstream.com (Glenn P. Parker) (06/29/91)
In article <1991Jun27.173201.22178@colorado.edu> devin@boulder.Colorado.EDU (Yampalimardilor) writes: > static char *RCSid = "$Header$"; > > to allow the use of ident to identify which .C files are used in an > executable. The compiler complains: > > "filename.C", line 1: warning: ::RCSid defined but not used > > This is pretty harmless, but I'd like to get it to shut up if possible. > Is it possible? Yes. static const char RCSid[] = "$Header$"; -- Glenn P. Parker glenn@bitstream.com Bitstream, Inc. uunet!huxley!glenn 215 First Street BIX: parker Cambridge, MA 02142-1270
warsaw@nlm.nih.gov (Barry A. Warsaw) (06/29/91)
>>>>> "Devin" == <devin@boulder.Colorado.EDU> writes:
Devin> We're using AT&T C++ 2.0 and RCS, and placing a line in the
Devin> .C files similar to
Devin> static char *RCSid = "$Header$";
Devin> to allow the use of ident to identify which .C files are
Devin> used in an executable. The compiler complains:
Devin> "filename.C", line 1: warning: ::RCSid defined but not used
I use:
static const char rcsid[]="$Id$";
No complaints from C++ 2.0.
-Barry