From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA37A388A034; Thu, 11 Mar 2021 16:46:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA37A388A034 From: "lewis at sophists dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99556] New: time_get::date_order() returns no_order on en_US - it should return mdy Date: Thu, 11 Mar 2021 16:46:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lewis at sophists dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2021 16:46:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99556 Bug ID: 99556 Summary: time_get::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=3D50367&action=3Dedit locale_time_get_date_order_no_order_Buggy.cpp According to=20 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::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 (apparentl= y) 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 wi= th g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0 Reproducing file is attached. note - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D9635 appears to be a similar report, but is almost 20 years old.=