Skip to content

Commit 58d5ccc

Browse files
Add support for GCC 15
- Fix a warning in the codebase - Enable new non-default warnings - Bump the versions in CI, move GCC 14 to the old compilers job - Bump the version in the CMake preset
1 parent 351bbbc commit 58d5ccc

6 files changed

Lines changed: 87 additions & 20 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
parameters:
55
GCC_VERSION:
66
type: string
7-
default: "14"
7+
default: "15"
88
CLANG_VERSION:
99
type: string
1010
default: "20"
@@ -38,6 +38,7 @@ jobs:
3838
- run:
3939
name: Installing dependencies (common)
4040
command: |
41+
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
4142
sudo apt-get update
4243
sudo apt-get install -y libboost-dev libgtest-dev libgmock-dev \
4344
libbenchmark-dev valgrind

.github/workflows/build.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,66 +36,66 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
include:
39-
- name: GCC 14 Release
39+
- name: GCC 15 Release
4040
os: ubuntu-latest
4141
BUILD_TYPE: Release
4242
COMPILER: gcc
4343

44-
- name: GCC 14 Release with ASan
44+
- name: GCC 15 Release with ASan
4545
os: ubuntu-latest
4646
BUILD_TYPE: Release
4747
COMPILER: gcc
4848
SANITIZE_ADDRESS: ON
4949

50-
- name: GCC 14 Release with TSan
50+
- name: GCC 15 Release with TSan
5151
os: ubuntu-latest
5252
BUILD_TYPE: Release
5353
COMPILER: gcc
5454
SANITIZE_THREAD: ON
5555

56-
- name: GCC 14 Release with UBSan
56+
- name: GCC 15 Release with UBSan
5757
os: ubuntu-latest
5858
BUILD_TYPE: Release
5959
COMPILER: gcc
6060
SANITIZE_UB: ON
6161

62-
- name: GCC 14 Debug
62+
- name: GCC 15 Debug
6363
os: ubuntu-latest
6464
BUILD_TYPE: Debug
6565
COMPILER: gcc
6666

67-
- name: GCC 14 Debug with ASan
67+
- name: GCC 15 Debug with ASan
6868
os: ubuntu-latest
6969
BUILD_TYPE: Debug
7070
COMPILER: gcc
7171
SANITIZE_ADDRESS: ON
7272

73-
- name: GCC 14 Debug with TSan
73+
- name: GCC 15 Debug with TSan
7474
os: ubuntu-latest
7575
BUILD_TYPE: Debug
7676
COMPILER: gcc
7777
SANITIZE_THREAD: ON
7878

79-
- name: GCC 14 Debug with UBSan
79+
- name: GCC 15 Debug with UBSan
8080
os: ubuntu-latest
8181
BUILD_TYPE: Debug
8282
COMPILER: gcc
8383
SANITIZE_UB: ON
8484

85-
- name: GCC 14 Debug without AVX2
85+
- name: GCC 15 Debug without AVX2
8686
os: ubuntu-latest
8787
BUILD_TYPE: Debug
8888
COMPILER: gcc
8989
AVX2: OFF
9090

91-
- name: GCC 14 Release static analysis & cpplint
91+
- name: GCC 15 Release static analysis & cpplint
9292
os: ubuntu-latest
9393
BUILD_TYPE: Release
9494
COMPILER: gcc
9595
STATIC_ANALYSIS: ON
9696
CPPLINT: ON
9797

98-
- name: GCC 14 default CMake configuration
98+
- name: GCC 15 default CMake configuration
9999
os: ubuntu-latest
100100
COMPILER: gcc
101101

@@ -285,7 +285,8 @@ jobs:
285285

286286
- name: Setup dependencies for GCC
287287
run: |
288-
sudo apt-get install -y g++-14 g++-14-multilib
288+
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
289+
sudo apt-get install -y g++-15 g++-15-multilib
289290
if: runner.os == 'Linux' && env.COMPILER == 'gcc'
290291

291292
- name: Setup dependencies for Linux LLVM (common)
@@ -343,7 +344,7 @@ jobs:
343344
CBT=""
344345
fi
345346
if [[ $COMPILER == "gcc" ]]; then
346-
V=14
347+
V=15
347348
EXTRA_CMAKE_ARGS=()
348349
export CC=gcc-$V
349350
export CXX=g++-$V

.github/workflows/old-compilers.yml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,64 @@ jobs:
685685
VERSION: 13
686686
STATS: OFF
687687

688+
- name: GCC 14 Release
689+
BUILD_TYPE: Release
690+
COMPILER: gcc
691+
VERSION: 14
692+
STATS: OFF
693+
BOOST: OFF
694+
695+
- name: GCC 14 Release with ASan
696+
BUILD_TYPE: Release
697+
SANITIZE_ADDRESS: ON
698+
COMPILER: gcc
699+
VERSION: 14
700+
STATS: OFF
701+
702+
- name: GCC 14 Release with TSan
703+
BUILD_TYPE: Release
704+
SANITIZE_THREAD: ON
705+
COMPILER: gcc
706+
VERSION: 14
707+
STATS: OFF
708+
BOOST: OFF
709+
710+
- name: GCC 14 Release with UBSan
711+
BUILD_TYPE: Release
712+
SANITIZE_UB: ON
713+
COMPILER: gcc
714+
VERSION: 14
715+
STATS: OFF
716+
717+
- name: GCC 14 Debug
718+
BUILD_TYPE: Debug
719+
COMPILER: gcc
720+
VERSION: 14
721+
STATS: OFF
722+
BOOST: OFF
723+
724+
- name: GCC 14 Debug with ASan
725+
BUILD_TYPE: Debug
726+
SANITIZE_ADDRESS: ON
727+
COMPILER: gcc
728+
VERSION: 14
729+
STATS: OFF
730+
731+
- name: GCC 14 Debug with TSan
732+
BUILD_TYPE: Debug
733+
SANITIZE_THREAD: ON
734+
COMPILER: gcc
735+
VERSION: 14
736+
STATS: OFF
737+
BOOST: OFF
738+
739+
- name: GCC 14 Debug with UBSan
740+
BUILD_TYPE: Debug
741+
SANITIZE_UB: ON
742+
COMPILER: gcc
743+
VERSION: 14
744+
STATS: OFF
745+
688746
steps:
689747
- uses: actions/checkout@v5
690748
with:
@@ -727,12 +785,14 @@ jobs:
727785
sudo apt-get install -y gcc
728786
if: env.COMPILER == 'gcc' && env.VERSION == '11'
729787

730-
- name: Setup dependencies for GCC 13 (PPA)
788+
- name: Setup dependencies for GCC 13 & 14 (PPA)
731789
run: |
732790
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
733791
sudo apt-get update
734-
sudo apt-get install -y g++-13
735-
if: env.COMPILER == 'gcc' && env.VERSION == '13'
792+
sudo apt-get install -y "g++-${VERSION}"
793+
if: >
794+
env.COMPILER == 'gcc'
795+
&& (env.VERSION == '13' || env.VERSION == '14')
736796
737797
- name: Configure CMake
738798
# Use a bash shell so we can use the same syntax for environment

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ set(GCC_GE_11_CXX_WARNING_FLAGS
115115
set(GCC_GE_12_CXX_WARNING_FLAGS "-Winterference-size")
116116
set(GCC_GE_14_CXX_WARNING_FLAGS "-Wnrvo" "-Welaborated-enum-base"
117117
"-Wdangling-reference")
118+
set(GCC_GE_15_CXX_WARNING_FLAGS "-Wleading-whitespace=spaces"
119+
"-Wtrailing-whitespace=any")
118120

119121
set(UNIX_CXX_FLAGS "-g")
120122

@@ -400,12 +402,14 @@ set(cxx_ge_12 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,12.0>")
400402
set(cxx_lt_13 "$<VERSION_LESS:$<CXX_COMPILER_VERSION>,13.0>")
401403
set(cxx_ge_13 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,13.0>")
402404
set(cxx_ge_14 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,14.0>")
405+
set(cxx_ge_15 "$<VERSION_GREATER_EQUAL:$<CXX_COMPILER_VERSION>,15.0>")
403406
set(is_clang_lt_13_not_windows "$<AND:${is_clang_not_windows},${cxx_lt_13}>")
404407
set(is_clang_ge_13_not_windows "$<AND:${is_clang_not_windows},${cxx_ge_13}>")
405408
set(is_clang_ge_14_not_windows "$<AND:${is_clang_not_windows},${cxx_ge_14}>")
406409
set(is_gxx_ge_11 "$<AND:${is_gxx_genex},${cxx_ge_11}>")
407410
set(is_gxx_ge_12 "$<AND:${is_gxx_genex},${cxx_ge_12}>")
408411
set(is_gxx_ge_14 "$<AND:${is_gxx_genex},${cxx_ge_14}>")
412+
set(is_gxx_ge_15 "$<AND:${is_gxx_genex},${cxx_ge_15}>")
409413
# Configuration
410414
set(has_avx2 "$<BOOL:${AVX2}>")
411415
set(use_boost_stacktrace "$<BOOL:${USE_BOOST_STACKTRACE}>")
@@ -711,6 +715,7 @@ function(COMMON_TARGET_PROPERTIES TARGET)
711715
"$<$<AND:${is_standalone},${is_gxx_ge_11}>:${GCC_GE_11_CXX_WARNING_FLAGS}>"
712716
"$<$<AND:${is_standalone},${is_gxx_ge_12}>:${GCC_GE_12_CXX_WARNING_FLAGS}>"
713717
"$<$<AND:${is_standalone},${is_gxx_ge_14}>:${GCC_GE_14_CXX_WARNING_FLAGS}>"
718+
"$<$<AND:${is_standalone},${is_gxx_ge_15}>:${GCC_GE_15_CXX_WARNING_FLAGS}>"
714719
# Optimization
715720
"$<${is_not_release_genex}:$<IF:${is_windows_genex},/Od,-O0>>"
716721
"$<$<AND:${is_release_genex},${is_not_windows}>:$<IF:${coverage_on},-O0,-O3>>"

CMakePresets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"name": "gcc",
8585
"hidden": true,
8686
"cacheVariables": {
87-
"CMAKE_C_COMPILER": "gcc-14",
88-
"CMAKE_CXX_COMPILER": "g++-14"
87+
"CMAKE_C_COMPILER": "gcc-15",
88+
"CMAKE_CXX_COMPILER": "g++-15"
8989
}
9090
},
9191
{

test/test_key_encode_decode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ UNODB_TEST(ARTKeyEncodeDecodeTest, UInt64C00010) {
348348
do_encode_decode_lt_test<T>(0x0102030405060708ULL, 0x090A0B0C0D0F1011ULL);
349349
do_encode_decode_lt_test(static_cast<T>(0), static_cast<T>(1));
350350
do_encode_decode_lt_test<T>(0x7FFFFFFFFFFFFFFFULL, 0x8000000000000000ULL);
351-
do_encode_decode_lt_test<T>(0xFFFFFFFFFFFFFFFEULL, static_cast<T>(~0ULL));
351+
do_encode_decode_lt_test<T>(0xFFFFFFFFFFFFFFFEULL, ~0ULL);
352352
}
353353

354354
UNODB_TEST(ARTKeyEncodeDecodeTest, Int64C00010) {

0 commit comments

Comments
 (0)