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]

Re: warning: `%y' yields only last 2 digits of year


On Wed, Mar 13, 2002 at 09:50:39AM -0500, Robert Dewar wrote:
> It was *specifically* for that common technique that I gave my example, and
> the suggestion of using %Y is irrelevant.
> 
> Once again, please don't assume you know better than the applications
> programmer what the *applications* requirements are. Warnings in languages
> should be about supposing that you know enough about the *language* in
> which the application is being written to identify constructs that are
> suspicious at the language level.

But if you write 19%y or 20%y, then the probability that this is
an application bug is way higher than that this is something intentional.
So IMHO the warning should be triggered only if %y is preceeded by 19 or
20.

	Jakub


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