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]

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


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