This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: warning: `%y' yields only last 2 digits of year
- From: Pablo Mejia <pjm at cctechnol dot com>
- To: clock at atrey dot karlin dot mff dot cuni dot cz, geoffk at geoffk dot org, gcc at gnu dot org
- Date: 12 Mar 2002 16:21:08 -0600
- Subject: Re: warning: `%y' yields only last 2 digits of year
- References: <20020312225442.A329@beton.cybernet.cz><jm7koh5wfd.fsf@desire.geoffk.org>
- Reply-to: pablo at cctechnol dot com
"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?