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: "David O'Brien" <obrien at FreeBSD dot org>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: Karel Kulhavy <clock at atrey dot karlin dot mff dot cuni dot cz>, gcc at gcc dot gnu dot org
- Date: Wed, 13 Mar 2002 16:34:17 -0800
- Subject: Re: warning: `%y' yields only last 2 digits of year
- Organization: The NUXI BSD group
- References: <20020312225442.A329@beton.cybernet.cz> <jm7koh5wfd.fsf@desire.geoffk.org>
- Reply-to: obrien at FreeBSD dot org
On Tue, Mar 12, 2002 at 01:05:26PM -0800, Geoff Keating wrote:
> > Please note that warning
> >
> > "warning: `%y' yields only last 2 digits of year"
> >
> > is absolutely stupid and according to my opinion should be
> > immediately removed. It is clearly stated in manpage that %y yields
> > only 0-99. It is not necessary to attach random pieces of manpages
> > into gcc's output, no matter how the manpages are relevant to the
> > code being compiled.
>
> You can use -Wno-format-y2k to disable this warning. I hope the name
> of the option will help to explain why the warning exists.
I agree, this warning has caused too many false positives. And with more
and more code I am involved with turning on -Werror, this is a problem.
This particular warning is a "low quality" one. And the 1999->2000 point
is over 2 years behind us now. Lets turn this around, why shouldn't one
have to -Wformat-y2k to get these warnings??
--
-- David (obrien@FreeBSD.org)