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

Robert Dewar dewar@gnat.com
Tue Mar 12 22:06:00 GMT 2002


<<Hm, it probably should be modified to check if "%y" is preceded by
"19", which would be clearly a bug.
>>

Well I would not say that is a bug, for example if you are using sliding
windows for handling Y2K, it is perfectly reasonable that in one branch
you have 19%y and in the other 20%y. It would be quite annoying to get a
warning here. I think warnings should be about use of the language, not
about guesses as to what are or are not reasonable application decisions.



More information about the Gcc mailing list