This is the mail archive of the gcc-patches@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: PATCH (head): -Wunused-static-variable


> 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:

#ifndef LINT
static char *sccsid = "@(#)blahblah";
#endif

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.

Kean


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