GCC warnings for unused global variables
Bernd Jendrissek
berndj@prism.co.za
Mon May 5 11:27:00 GMT 2003
On Fri, May 02, 2003 at 09:34:55AM -0700, David O'Brien wrote:
> On Fri, May 02, 2003 at 01:42:30PM +0200, Bonzini wrote:
> > mankind is warned with at least a year of advance, and let's face that
> > the fix is (more or less) as simple as
> > grep -rl "^static.*const.*rcsid" | perl -i -pe '!$replaced_yet && s/^static.*const(.*rcsid)/volatile$1/ && ($replaced_yet = 1)'.
>
> You've never worked on a large corporate source base have you? Just
> making the source change is only 1/2 the battle. Getting the review
> board (or release engineer, or what ever) approval for wide sweeping
> changes can be quite difficult.
And getting approval to use a different compiler is easy?
If the legacy code is too "precious" to touch, then just continue to use
gcc-1.42.
Really, I just want my cake and eat it. I'd like to have -Wunused-static-foo
to find all my dead data, but I *don't* want it hidden among 100's of rcsid
instances. It would be nice if you could fix (yes I consider static const
char *rcsid = "$foo$" to be a [hairsplitting] bug) your code so that I can
fix mine.
More information about the Gcc
mailing list