[Bug c/3190] -Wformat-y2k doesn't belong to -Wall - it's hard to avoid

thekingant at users dot sourceforge dot net gcc-bugzilla@gcc.gnu.org
Fri Oct 31 00:43:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3190


thekingant at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thekingant at users dot
                   |                            |sourceforge dot net


------- Additional Comments From thekingant at users dot sourceforge dot net  2003-10-31 00:04 -------
FYI, bug 8714 is very similar to this one.

>From what I can tell, here's what this boils down to...
-I want to show the user a date in "the preferred date representation for the
current locale"
-gcc warns me that the year might only show up as 2 digits
-I don't care at all, I'm just giving the user what they wanted

If you truely feel that 2 digit years should never be displayed when the year is
greater than 2 digits then the correct solution is to change the locale, not
scare me into changing my code.

I occasionally do some work for the Gaim project.  It's an instant messaging
program with about 97,275 source lines of code (number generated using David A.
Wheeler's 'SLOCCount'.).  On most platforms, when compiling with -Wall, the ONLY
warning is this one about only showing the last 2 digits of the year.  Sure, I
could add a workaround to not show the warning, but doesn't that seem a bit
ridiculous?

My point is this: I'm trying to show a date to the user how they prefer to see
it, why does gcc want me to change that?



More information about the Gcc-bugs mailing list