https://gcc.gnu.org/g:0b22234b873c6f97c4e31d7e78b23f1d4126fc13

commit r16-6252-g0b22234b873c6f97c4e31d7e78b23f1d4126fc13
Author: Jonathan Wakely <[email protected]>
Date:   Thu Dec 18 23:37:35 2025 +0000

    libstdc++: Fix some warnings seen during mingw-w64 bootstrap
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/chrono_io.h (__formatter_chrono::_M_write): Add
            maybe_unused attribute to avoid -Wunused-parameter warning.
            * src/c++20/tzdb.cc (detect_windows_zone): Decay array to
            pointer to avoid -Warray-compare warning.

Diff:
---
 libstdc++-v3/include/bits/chrono_io.h | 3 ++-
 libstdc++-v3/src/c++20/tzdb.cc        | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/bits/chrono_io.h 
b/libstdc++-v3/include/bits/chrono_io.h
index 3b1f5862cba6..75dd532a8cb3 100644
--- a/libstdc++-v3/include/bits/chrono_io.h
+++ b/libstdc++-v3/include/bits/chrono_io.h
@@ -919,7 +919,8 @@ namespace __format
     private:
       template<typename _OutIter>
        _OutIter
-       _M_write(_OutIter __out, const locale& __loc, __string_view __s) const
+       _M_write(_OutIter __out, [[maybe_unused]] const locale& __loc,
+                __string_view __s) const
        {
 #if defined _GLIBCXX_USE_NL_LANGINFO_L && __CHAR_BIT__ == 8
          __sso_string __buf;
diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index 77b283fb6990..53441880ae6e 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -1854,7 +1854,7 @@ namespace std::chrono
        return zone_range.front().iana_name;
 
       const auto iter = ranges::lower_bound(
-         zone_range, territory, {}, &windows_zone_map_entry::territory);
+         zone_range, +territory, {}, &windows_zone_map_entry::territory);
       if (iter == zone_range.end() || iter->territory != territory)
        // Territory not within the the map, use "001".
        return zone_range.front().iana_name;

Reply via email to