c/3190 Re: warning: `%y' yields only last 2 digits of year
Joseph S. Myers
jsm28@cam.ac.uk
Tue Mar 12 14:12:00 GMT 2002
On Tue, 12 Mar 2002, Robert Dewar wrote:
> What a silly warning, and what an even sillier option. I sure agree with
> Karel on this one, to whom could such a warning possibly be useful?
It's a style warning, as with many other GCC warnings. It's of use if you
consider that wanting to output 2-digit years is unusual and a bad idea.
Of course they *can* be used safely, just as gets() can be used safely if
you know exactly what input can be passed to the program, but that's
unusual.
The question of whether such warnings (and which such warnings) should be
in -Wall is c/3190. In the reply to that PR I reqested feedback
(especially from NetBSD's GCC maintainers) on which of the separate cases
involved should be warned about when, but the PR hasn't yet received any.
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc
mailing list