This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


    "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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]