Article View: gnu.gcc.help
Article #52185SCCS strings embedded in code with -Wall
From: Michael J. Parma
Date: Fri, 15 Jan 1993 20:15
Date: Fri, 15 Jan 1993 20:15
24 lines
1553 bytes
1553 bytes
In order to identify the version of a source file used to generate an executable, we currently include the following line in our 'C' source code: static char sccsid = "#(@) file.c 3.12 01/15/93"; The string is obviously filled in by SCCS and becomes embedded in the text segment of the compiled code. Then performing 'what' on the binary tells us what version of the source was used to make it. The problem is that '-Wall' causes the a warning about an unused variable. We don't want _any_ warning messages if we can help it. How can you embed this string in without the aforementioned warnings ? Obviously, removing 'static' would do it but might result in duplicate variable names in large projects. Something that works on any standard compiler would be welcomed, but GNU specific 'pragma's, etc. would be fine. Thanks, Mike Parma parma@ct.picker.com Picker International, Inc. (216) 473-2801
Technical Details
Message-ID:
<1993Jan15.201556.9105@picker.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!caen!malgudi.oar.net!picker!sophie.ct.picker.com!parmaShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,cb44527f7ddf772a,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-01-15 12:15:56 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!caen!malgudi.oar.net!picker!sophie.ct.picker.com!parma From: parma@sophie.ct.picker.com (Michael J. Parma) Subject: SCCS strings embedded in code with -Wall Message-ID: <1993Jan15.201556.9105@picker.com> Sender: news@picker.com Nntp-Posting-Host: 144.54.37.66 Organization: Picker International, Inc. Distribution: na Date: Fri, 15 Jan 1993 20:15:56 GMT Lines: 24