From 70b17181b42f1c1264dcb4c50916575e61a65f3c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 14 May 2026 10:51:40 +0200 Subject: [PATCH] Bump gcc and clang versions --- .github/workflows/test-compile.yml | 6 +++--- kernel/fmt.cc | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) 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)