https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107801
--- Comment #15 from Jan Dubiec <jdx at o2 dot pl> --- I have applied the patch manually to 12.2 tree and this time got following error message: /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=compile /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/libsupc++/.libs -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include -mn -mint32 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/libsupc++ -std=gnu++17 -nostdinc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=floating_from_chars.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -mn -mint32 -c -o floating_from_chars.lo ../../../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_chars.cc libtool: compile: /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/libsupc++/.libs -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include -mn -mint32 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/libsupc++ -std=gnu++17 -nostdinc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=floating_from_chars.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -mn -mint32 -c ../../../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_chars.cc -o floating_from_chars.o In file included from D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/basic_string.h:47, from D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string:53, from d:\works\xcomp\gcc-12.2.0\libstdc++-v3\src\c++17\floating_from_chars.cc:36: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view: In member function 'std::basic_string_view<_CharT, _Traits>::size_type std::basic_string_view<_CharT, _Traits>::copy(_CharT*, size_type, size_type) const': D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:301:42: error: no matching function for call to 'min(std::basic_string_view<_CharT, _Traits>::size_type&, int)' 301 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/array:43, from d:\works\xcomp\gcc-12.2.0\libstdc++-v3\src\c++17\floating_from_chars.cc:33: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 230 | min(const _Tp& __a, const _Tp& __b) | ^~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:301:42: note: deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int') 301 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:301:42: note: deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int') 301 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view: In member function 'constexpr std::basic_string_view<_CharT, _Traits> std::basic_string_view<_CharT, _Traits>::substr(size_type, size_type) const': D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:312:42: error: no matching function for call to 'min(std::basic_string_view<_CharT, _Traits>::size_type&, int)' 312 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 230 | min(const _Tp& __a, const _Tp& __b) | ^~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:312:42: note: deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int') 312 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/include/string_view:312:42: note: deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int') 312 | const size_type __rlen = std::min(__n, _M_len - __pos); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ make[9]: *** [Makefile:585: floating_from_chars.lo] Error 1 make[9]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src/c++17' make[8]: *** [Makefile:781: all-recursive] Error 1 make[8]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3/src' make[7]: *** [Makefile:576: all-recursive] Error 1 make[7]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3' make[6]: *** [Makefile:501: all] Error 2 make[6]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/normal/int32/libstdc++-v3' make[5]: *** [Makefile:870: multi-do] Error 1 make[5]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[4]: *** [Makefile:840: all-multi] Error 2 make[4]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[3]: *** [Makefile:576: all-recursive] Error 1 make[3]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[2]: *** [Makefile:501: all] Error 2 make[2]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[1]: *** [Makefile:12297: all-target-libstdc++-v3] Error 2 make[1]: Leaving directory '/d/Works/xcomp/gcc-build' make: *** [Makefile:1043: all] Error 2 Note "-mn -mint32" options – normal mode with 32-bit integers.