Article View: gnu.gcc.help
Article #54438Re: -Wall switch with SCCS
From: D'Arcy J.M. Cain
Date: Sun, 28 Oct 1990 15:56
Date: Sun, 28 Oct 1990 15:56
31 lines
1966 bytes
1966 bytes
In article <1990Oct26.225541.10199@odetics.com> Frank Merrow writes:
> [...]
> Every program has the following statement in the heading:
>
>static char SCCS_ID[]="%W%";
>
>We want the string to appear in the output module, but to prevent the various
>SCCS_IDs from the various modules from interfering with each other they are
>declared as static. The -Wall switch implies the -Wunused switch which is
>generating a annoying warning. I want unused warning, just not on the
Although not really answering your question consider using the value. I do
the following in my chat program. (I use RCS but the idea is the same.)
every source file has a line such as the following:
char chat_rcsid[] = "$Id:$\b ";
where 'chat' is replaced by the current module name such as chatter_rcsid,
chc_rcsid and chs_rcsid. I then declare these as extern in one module and
print them when given an undocumented command with the following:
printf("%s\n", chat_rcsid + 1);
For each string. Makes a good debugging tool especially if someone else
compiles the program.
--
D'Arcy J.M. Cain (darcy@druid) |
D'Arcy Cain Consulting | I support gun control.
West Hill, Ontario, Canada | Let's start with the government!
+ 416 281 6094 |
Technical Details
Message-ID:
<1990Oct28.155610.5337@druid.uucp>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!cs.utexas.edu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!lethe!druid!darcyReferences:
<1990Oct26.225541.10199@odetics.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,8fc915badc50c6dd,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1990-10-28 07:56:10 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!cs.utexas.edu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!lethe!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Newsgroups: gnu.gcc.help Subject: Re: -Wall switch with SCCS Message-ID: <1990Oct28.155610.5337@druid.uucp> Date: 28 Oct 90 15:56:10 GMT References: <1990Oct26.225541.10199@odetics.com> Organization: D'Arcy Cain Consulting, West Hill, Ontario Lines: 31 Posted: Sun Oct 28 16:56:10 1990