]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Report compilation error on formatting "%d" from month_last [PR120650]
authorTomasz Kamiński <tkaminsk@redhat.com>
Tue, 24 Jun 2025 07:17:12 +0000 (09:17 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Mon, 30 Jun 2025 10:46:13 +0000 (12:46 +0200)
commit53d2ca1541b34bb2f840d5aede9b826025dd0bb7
treebb25eeb6840b1f16d1ece5626ff5007c6e30543c
parent4297261e0ef6f35cffc21d4e27e9a0300afe74e8
libstdc++: Report compilation error on formatting "%d" from month_last [PR120650]

For month_day we incorrectly reported day information to be available, which lead
to format_error being thrown from the call to formatter::format at runtime, instead
of making call to format ill-formed.

PR libstdc++/120650

libstdc++-v3/ChangeLog:

* include/bits/chrono_io.h
(formatter<chrono::month_day_last,_CharT>::parse): Call _M_parse with
only Month being available.

(cherry picked from commit 190aaaaf077fe5f318e168a7a1e1aa57058f377e)
libstdc++-v3/include/bits/chrono_io.h