This is the mail archive of the
mailing list for the GCC project.
Re: PATCH (head): -Wunused-static-variable
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Kean Johnston <jkj at sco dot com>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 02 May 2003 11:19:44 +0100
- Subject: Re: PATCH (head): -Wunused-static-variable
- Organization: Codesourcery LLC
- References: <006f01c31052$ca96d0b0$03419384@shrike>
Kean Johnston wrote:
In reference to the message thread starting at
how about the following patch. This is against the head, but I can
easily redo this on the 3.3 branch if that is desired and someone
can take care of the merging back to the head.
2003-05-01 Kean Johnston <firstname.lastname@example.org>
* c-opts.c (COMMAND_LINE_OPTIONS): Add -Wunused-static-variable
for finer grained warning control.
* doc/invoke.texi: Document it.
* flags.h: Declare warn_unused_static_variable.
* toplev.c (W_options): Add it.
(check_global_declarations): Use it.
IIRC -Wunused used to warn about this kind of thing. I've not been paying
attention. Has the -Wunused functionality been moved into -Wall, or is it
what is wrong with having this check in -Wunused?
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
email@example.com : http://www.cs.bris.ac.uk/~nathan/ : firstname.lastname@example.org