warning: `%y' yields only last 2 digits of year
Pablo Mejia
pjm@cctechnol.com
Tue Mar 12 14:21:00 GMT 2002
"warning: `%y' yields only last 2 digits of year"
Karel> It is clearly stated in manpage that %y yields only
Karel> 0-99. It is not necessary to attach random pieces of
Karel> manpages into gcc's output, no matter how the manpages are
Karel> relevant to the code being compiled.
Geoff> You can use -Wno-format-y2k to disable this warning. I
Geoff> hope the name of the option will help to explain why the
Geoff> warning exists.
I understand the purpose of the warning. However, I find that it
yields many 'false' positives. I have code that must use %y (that is
the format of the output I must generate). It is annoying that -Wall
forces this to on. Obviously there are others that feel the same way.
I thought the criteria for -Wall warnings was that false positives be
easily avoidable. The problem with this warning is that there is no
simple way to avoid it (short of adding the flag).
Would a patch to remove this 'feature' from -Wall be acceptable?
More information about the Gcc
mailing list