public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lewis at sophists dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99556] New: time_get<wchar_t>::date_order() returns no_order on en_US - it should return mdy Date: Thu, 11 Mar 2021 16:46:08 +0000 [thread overview] Message-ID: <bug-99556-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2021-03-11 16:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-11 16:46 lewis at sophists dot com [this message] 2021-03-11 17:12 ` [Bug libstdc++/99556] " redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-99556-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).