diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-02-25 16:57:20 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-02-25 16:57:20 +0000 |
commit | a47cec4ca7302e65f63490ad7f251c5a469bc0e0 (patch) | |
tree | 0d39137b27224c585818be3928f364288242b336 | |
parent | 232f7461167d58f77f52f881f36145faf27b25d6 (diff) | |
download | gcc-a47cec4ca7302e65f63490ad7f251c5a469bc0e0.zip gcc-a47cec4ca7302e65f63490ad7f251c5a469bc0e0.tar.gz gcc-a47cec4ca7302e65f63490ad7f251c5a469bc0e0.tar.bz2 |
libstdc++: Use uint32_t for all year_month_day::_S_from_days arithmetic
libstdc++-v3/ChangeLog:
* include/std/chrono (year_month_day::_S_from_days): Perform
all calculations with type uint32_t.
-rw-r--r-- | libstdc++-v3/include/std/chrono | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index eef503a..fcdaee7 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -2455,7 +2455,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr auto __z2 = static_cast<uint32_t>(-1468000); constexpr auto __r2_e3 = static_cast<uint32_t>(536895458); - const auto __r0 = __dp.count() + __r2_e3; + const auto __r0 = static_cast<uint32_t>(__dp.count()) + __r2_e3; const auto __n1 = 4 * __r0 + 3; const auto __q1 = __n1 / 146097; |