Landing: 2451667193e4

Project / Subsystem

gcc / libstdc++

Date

2026-05-13

Author

Tomasz Kamiński

Commit

2451667193e4e00b49c4ef9d95c0a3a1aa955f82

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
2451667193e4e00b49c4ef9d95c0a3a1aa955f82
source_type
github
headline
libstdc++: Use on_month_day istream operator in ZoneInfo parsing.
tldr
libstdc++'s ZoneInfo parsing now uses the `on_month_day` istream operator for more flexible date parsing.
author
Tomasz Kamiński
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • time zones
  • parsing
  • c++20
discussion_id_link
bugzilla_pr
date
2026-05-13T00:00:00.000Z

This commit modifies ZoneInfo parsing in libstdc++ to directly use the operator>> for on_month_day, removing the on_day tag. The operator>>(istream&, on_month_day) is updated to handle cases where the month component is missing and to set failbit accordingly. This change enables parsing month, day, and time in a single operation. The code also handles failures when parsing the day number N for Www>=N or Www<=N productions, leaving the day part of the input unchanged and setting failbit.