public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/99556] New: time_get<wchar_t>::date_order()  returns no_order on en_US - it should return mdy
@ 2021-03-11 16:46 lewis at sophists dot com
  2021-03-11 17:12 ` [Bug libstdc++/99556] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: lewis at sophists dot com @ 2021-03-11 16:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99556

            Bug ID: 99556
           Summary: time_get<wchar_t>::date_order()  returns no_order on
                    en_US - it should return mdy
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lewis at sophists dot com
  Target Milestone: ---

Created attachment 50367
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50367&action=edit
locale_time_get_date_order_no_order_Buggy.cpp

According to 
    https://en.cppreference.com/w/cpp/locale/time_get/date_order

the 'date_order' field for the locale en_US should be MDY;
libstdc++ appears to understand this emprirically from how it parses dates.

However, the value returned by time_get<wchar_t>::date_order() is 'no_order'
instead of 'mdy'.

This behavior APPEARS faulty given the above documentation.

I would not this behavior is also DIFFERENT than libc++ (clangs library) and
differnt from visual studios implmenetation which all return the (apparently)
correct mdy value.

Compile with
g++ locale_time_get_date_order_no_order_Buggy.cpp

will happen with any compiler version, but I tested on the latest ubuntu with
g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0

Reproducing file is attached.

note - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9635 appears to be a
similar report, but is almost 20 years old.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-11 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 16:46 [Bug libstdc++/99556] New: time_get<wchar_t>::date_order() returns no_order on en_US - it should return mdy lewis at sophists dot com
2021-03-11 17:12 ` [Bug libstdc++/99556] " redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).