This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c/3190 Re: warning: `%y' yields only last 2 digits of year
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: <clock at atrey dot karlin dot mff dot cuni dot cz>, <geoffk at geoffk dot org>, <gcc at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 12 Mar 2002 22:11:58 +0000 (GMT)
- Subject: c/3190 Re: warning: `%y' yields only last 2 digits of year
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