From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 95B613858C66; Wed, 19 Jul 2023 10:11:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95B613858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689761511; bh=GSVjK0l43Zs41mDnpJiKrmuxJ175PokNO6eNzXjBL/0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tmpnhzy+nlBM66yNR2+BSLMqWvrfxRlDe1vPyx4pcQNyHBX77wW8KpMFMxdhWP4QU aSvOYHaEhu9vg8EuFYHRKvSeBM5aRTVQaq1tIgdDgN/WW/n6R7pLlVTWKpyGDUCcDB EW9UVJFuHoZlv9+3VnDZHkexVdV3QC6Ij3ormej8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110708] std::format("{:%EEC %OOd}", std::chrono::system_clock::now()) should be rejected Date: Wed, 19 Jul 2023 10:11:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110708 --- Comment #2 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:52bfec7ea0eb0f1a4c5bfa55b0d6b9b6c8808e26 commit r14-2638-g52bfec7ea0eb0f1a4c5bfa55b0d6b9b6c8808e26 Author: Jonathan Wakely Date: Tue Jul 18 10:36:37 2023 +0100 libstdc++: Check for multiple modifiers in chrono format string [PR1107= 08] The logic for handling modified chrono specs like %Ey was just restarting the loop after each modifier, and not checking whether we'd already seen a modifier. libstdc++-v3/ChangeLog: PR libstdc++/110708 * include/bits/chrono_io.h (__formatter_chrono::_M_parse): Only allow a single modifier. * testsuite/std/time/format.cc: Check multiple modifiers.=