This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC warnings for unused global variables
- From: Bernd Jendrissek <berndj at prism dot co dot za>
- To: "David O'Brien" <obrien at FreeBSD dot org>
- Cc: Bonzini <bonzini at gnu dot org>, gcc at gcc dot gnu dot org
- Date: Mon, 5 May 2003 13:26:31 +0200
- Subject: Re: GCC warnings for unused global variables
- References: <20030502163455.GD48461@dragon.nuxi.com>
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.