From cf3c8a216be5aa496844aadb43ca05ad5c47bb46 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sun, 5 Nov 2023 18:04:23 +0100 Subject: [PATCH] CMake: Disable Clang 18+ `-Wvla-cxx-extension` warning This warning warns about variable-length arrays being a non-standard extension to the C++ language. We still have a few instances of VLAs, so let's disable the warning for now. This does not interfere with `-Wvla`, which we use to completely forbid this (potentially dangerous) feature in the Kernel and LibCrypto. --- Meta/CMake/common_compile_options.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 0acf0cd0cb..9c4dd2bd1d 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -24,6 +24,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$") add_compile_options(-Wno-implicit-const-int-float-conversion) add_compile_options(-Wno-user-defined-literals) + add_compile_options(-Wno-vla-cxx-extension) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Only ignore expansion-to-defined for g++, clang's implementation doesn't complain about function-like macros add_compile_options(-Wno-expansion-to-defined)