This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Warnings about rcs_id strings: let's settle this


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]