]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/std/chrono
libstdc++: Fix conversions from date types to integers [PR 99301]
authorJonathan Wakely <jwakely@redhat.com>
Sat, 27 Feb 2021 12:50:53 +0000 (12:50 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Sat, 27 Feb 2021 12:53:15 +0000 (12:53 +0000)
commit699672d4dccfb5579dbe48977bda86f6836225a0
tree00e0b091a5855c0ef0c9d89bb65a3d368ed92bd7
parent652623f7c68594b1825a333bf8e83e87d1c3f523
libstdc++: Fix conversions from date types to integers [PR 99301]

The conversions to integer types are explicit, so need to use the
correct type. Converting to uint32_t only works if that is the same type
as unsigned.

libstdc++-v3/ChangeLog:

PR libstdc++/99301
* include/std/chrono (year_month_day::_M_days_since_epoch()):
Convert chrono::month and chrono::day to unsigned before
converting to uint32_t.
libstdc++-v3/include/std/chrono