Skip to content

Commit 51b93a0

Browse files
committed
columnstore warnings with gcc 12.x and 13.x
1 parent 19856db commit 51b93a0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

storage/columnstore/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ IF(NOT PLUGIN_PERFSCHEMA STREQUAL NO)
99
add_definitions(-DHAVE_PSI_INTERFACE=)
1010
ENDIF()
1111

12+
# new gcc is quite buggy re. spurious warnings. let's shut it up
13+
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "12.0.0")
14+
# 12
15+
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=restrict")
16+
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=use-after-free")
17+
# 13
18+
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=maybe-uninitialized")
19+
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=dangling-reference")
20+
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-error=dangling-pointer")
21+
ENDIF()
22+
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-strict-aliasing")
23+
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
1224

1325
# this does everything, gets the var from the correct scope, appends new
1426
# values, sets in the correct scope

0 commit comments

Comments
 (0)