This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Warnings about rcs_id strings: let's settle this
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Kean Johnston <jkj at sco dot com>
- Cc: 'Zack Weinberg' <zack at codesourcery dot com>, 'Joe Buck' <jbuck at synopsys dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 2 May 2003 20:28:21 +0100 (BST)
- Subject: RE: Warnings about rcs_id strings: let's settle this
- References: <009d01c310dd$8bb9c3d0$03419384@shrike>
On Fri, 2 May 2003, Kean Johnston wrote:
> LIKE to use -Werror, but the fact that the SVR3.2 code is so
> riddled with static char *sccsid crap prevents that. I think
Is this code not then riddled with other old practices that generate
warnings, such as implicit int? Certainly *BSD have needed extensive
cleanups of such practices to enable usage of -Wall -Werror, changing to
an __RCSID macro was only a small part (which I imagine was a lot more
automatable than most).
> the intent is to get this warning to do the right thing, not
> just solve one regression case. Sometimes (read: often) when
> you fix one regression bug you solve more than one problem
> in the fix. This is such a time. Let me state this another way.
> What is the *HARM* in checking non-const.
It would break things for anyone (not using -W/-Wextra) expecting unused
variables to be detected by -Wall and -Wunused-variable, following the
existing longstanding clear documentation of what -Wunused-variable does.
I don't know how many people have such expectations, but if what
-Wunused-variable does is to be changed then rather than making its name
misleading by restricting it to local variables only it might make more
sense for it to be an option that turns on -Wunused-local-variable and
-Wunused-static-variable (both being new options, only the first in
-Wall), so expanding rather than reducing what it does.
--
Joseph S. Myers
jsm28@cam.ac.uk