https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107801
Bug ID: 107801 Summary: Building cross compiler for H8 family fails in libstdc++ (c++17/memory_resource.cc) Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jdx at o2 dot pl Target Milestone: --- I am trying to build under MingW64/Windows 10 the toolchain for H8 using following steps: 1. build binutils and install it to a sysroot, 2. build "stage 1" gcc and install it to the sysroot, 3. build newlib and install it to the sysroot, 4. build "stage 2" gcc and install it to the sysroot, 5. build gdb. "Stage 1" configuration command: ../gcc-12.2.0/configure --prefix=/usr/local --with-sysroot=/d/Works/xcomp/sysroot --target=h8300-elf --disable-nls --disable-threads --disable-tls --enable-checking=release --enable-languages=c --with-newlib --without-headers --enable-multilib --enable-lto --disable-shared --enable-static --disable-host-shared --disable-bootstrap --disable-libatomic --disable-libgomp --disable-libitm --disable-libquadmath --disable-libsanitizer --disable-libssp --disable-libvtv --with-system-zlib --with-pkgversion='GNU Toolchain for the Renesas H8\, H8S and H8SX Families [Built by jdx]' "Stage 2" configuration command: CFLAGS_FOR_TARGET+="-isystem /d/Works/xcomp/sysroot/h8300-elf/include" CXXFLAGS_FOR_TARGET+="-isystem /d/Works/xcomp/sysroot/h8300-elf/include" ../gcc-12.2.0/configure --prefix=/usr/local --with-sysroot=/d/Works/xcomp/sysroot --target=h8300-elf --disable-nls --disable-threads --disable-tls --enable-checking=release --enable-languages=c,c++ --with-newlib --enable-multilib --enable-lto --disable-shared --enable-static --disable-host-shared --disable-libstdcxx-pch --with-system-zlib --with-pkgversion='GNU Toolchain for the Renesas H8\, H8S and H8SX Families [Built by jdx]' The building process fails when building "stage 2" gcc with following error message: [...] Making all in c++17 make[5]: Entering directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/c++17' /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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 -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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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 -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/floating_from_chars.cc -o floating_from_chars.o /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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_to_chars.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c -o floating_to_chars.lo ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/floating_to_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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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_to_chars.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/floating_to_chars.cc -o floating_to_chars.o /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_dir.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c -o fs_dir.lo ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_dir.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc -o fs_dir.o In file included from ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc:37: d:\works\xcomp\gcc-12.2.0\libstdc++-v3\src\filesystem\dir-common.h: In static member function 'static std::filesystem::__gnu_posix::DIR* std::filesystem::_Dir_base::openat(const _At_path&, bool)': d:\works\xcomp\gcc-12.2.0\libstdc++-v3\src\filesystem\dir-common.h:210:36: warning: unused parameter 'nofollow' [-Wunused-parameter] 210 | openat(const _At_path& atp, bool nofollow) | ~~~~~^~~~~~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc: In member function 'bool std::filesystem::__cxx11::_Dir::do_unlink(bool, std::error_code&) const': ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_dir.cc:147:18: warning: unused parameter 'is_directory' [-Wunused-parameter] 147 | do_unlink(bool is_directory, error_code& ec) const noexcept | ~~~~~^~~~~~~~~~~~ /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_ops.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c -o fs_ops.lo ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_ops.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_ops.cc -o fs_ops.o /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_path.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c -o fs_path.lo ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_path.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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=fs_path.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/fs_path.cc -o fs_path.o /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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=memory_resource.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c -o memory_resource.lo ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.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/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/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 -I/d/Works/xcomp/gcc-12.2.0/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/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=memory_resource.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -c ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc -o memory_resource.o ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:881:15: warning: left shift count >= width of type [-Wshift-count-overflow] 881 | 1<<15, 1<<16, 1<<17, | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:881:22: warning: left shift count >= width of type [-Wshift-count-overflow] 881 | 1<<15, 1<<16, 1<<17, | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:882:8: warning: left shift count >= width of type [-Wshift-count-overflow] 882 | 1<<20, 1<<21, 1<<22 // 4MB should be enough for anybody | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:882:15: warning: left shift count >= width of type [-Wshift-count-overflow] 882 | 1<<20, 1<<21, 1<<22 // 4MB should be enough for anybody | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:882:22: warning: left shift count >= width of type [-Wshift-count-overflow] 882 | 1<<20, 1<<21, 1<<22 // 4MB should be enough for anybody | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:881:8: error: narrowing conversion of '-32768' from 'int' to 'std::size_t' {aka 'long unsigned int'} [-Wnarrowing] 881 | 1<<15, 1<<16, 1<<17, | ~^~~~ ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc: In function 'std::pmr::pool_options std::pmr::{anonymous}::munge_options(std::pmr::pool_options)': ../../../../../gcc-12.2.0/libstdc++-v3/src/c++17/memory_resource.cc:937:44: error: non-constant condition for static assertion 937 | static_assert(std::__has_single_bit(pool_sizes[0])); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ make[5]: *** [Makefile:585: memory_resource.lo] Error 1 make[5]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/c++17' make[4]: *** [Makefile:781: all-recursive] Error 1 make[4]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src' 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 This is likely due to the fact that on H8/300H, H8S and H8SX int is 16 bits wide by default (i.e. unless -mint32 is passed to the compiler, see https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/H8_002f300-Options.html); on H8/300 int is always 16 bit wide.