diff --git a/.github/workflows/test-compile.yml b/.github/workflows/test-compile.yml index fe6a43634..3e2ac34c9 100644 --- a/.github/workflows/test-compile.yml +++ b/.github/workflows/test-compile.yml @@ -47,8 +47,8 @@ jobs: - 'clang-14' - 'gcc-11' # newest, make sure to update maximum standard step to match - - 'clang-19' - - 'gcc-14' + - 'clang-22' + - 'gcc-15' include: # macOS x86 - os: macos-15-intel @@ -96,7 +96,7 @@ jobs: # maximum standard, only on newest compilers - name: Build C++26 - if: ${{ matrix.compiler == 'clang-19' || matrix.compiler == 'gcc-14' }} + if: ${{ matrix.compiler == 'clang-19' || matrix.compiler == 'clang-22' || matrix.compiler == 'gcc-15' }} shell: bash run: | make config-$CC_SHORT diff --git a/kernel/fmt.cc b/kernel/fmt.cc index 200e7e5ce..15179a75a 100644 --- a/kernel/fmt.cc +++ b/kernel/fmt.cc @@ -804,8 +804,10 @@ std::string Fmt::render() const buf += 'X'; else if (has_z) buf += 'Z'; - else - buf += (part.hex_upper ? "0123456789ABCDEF" : "0123456789abcdef")[subvalue.as_int()]; + else { + const char *digits = part.hex_upper ? "0123456789ABCDEF" : "0123456789abcdef"; + buf += digits[subvalue.as_int()]; + } } } else if (part.base == 10) { if (part.show_base)