This is the mail archive of the
mailing list for the GCC project.
RE: PATCH (head): -Wunused-static-variable
- From: "Kean Johnston" <jkj at sco dot com>
- To: "'Joseph S. Myers'" <jsm28 at cam dot ac dot uk>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 2 May 2003 06:39:43 -0700
- Subject: RE: PATCH (head): -Wunused-static-variable
- Organization: The SCO Group
> You should follow the convention of -Wunused-parameter that
> extra -Wunused options get enabled if -Wextra is used (so
> -Wall -Wextra enables this warning).
Ok I can do that.
> so I think this new option should be specifically for const static
> variables, with nonconst ones staying in the existing option.
No, that explicity breaks the intent of the option. Since this
whole discussion is because of the extremely pervasive history use
of a construct like:
static char *sccsid = "@(#)blahblah";
Having this be for const only breaks the intent. There are several
hundred thousand lines of code in many projects that use this, and
were using it since before const was even in the language.