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

Robert Dewar dewar@gnat.com
Tue Mar 12 14:36:00 GMT 2002


But there are lots of forms which *require* the year to be output as two
digits, and there is nothing wrong at all with doing so. To think otherwise
is to have taken some totally bizarre viewpoint of what Y2K was all about.

It's perfectly fine for example to say 01/05/02 on a check, and requiring
2002 is a waste of ink. I don't see any *language* style issue and that
is all that style warnings should be about. This is about *what* you
are programming, whereas style options should be about *how* you are
programming. 

An anology would be if the compiler watched for the string "Mrs." in output
and printed a warning saying "inappropriate term, consider using Ms instead".



More information about the Gcc mailing list