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]

Re: -Wformat=2 patch


On Mon, 2 Oct 2000, Michael Meissner wrote:

> I must say, I really don't like using a plain value of `2' as the value for the
> switch.  I would think, something like:
> 
> 	-Wformat
> 	-Wformat=nonliteral
> 
> would be better.

Is this saying that the existing -Wformat=2 option should not be
documented but should instead be changed to something else?

Existing practice would make the options -Wformat-nonliteral instead of
-Wformat=nonliteral.  There's then the question of what -Wall=2 (in the
C++ compiler) should do (and why the C and C++ compilers have entirely
separate warning option parsers in the first place, and why they work
through long sequences of strcmps).  And -Wformat-nonliteral could itself
have multiple warning levels, if it were felt desirable at higher levels
to warn for some cases of nonliteral format arguments to vprintf-type
functions (though my proposed -Wmissing-format-attribute covers the more
useful cases of this).

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