mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
Meta: Enable warning for the use of VLAs
This commit enables warnings when using variable length arrays. For disabling this warning locally use -Wno-vla, as it will work both across Clang and GCC.
This commit is contained in:
parent
74309ce8c2
commit
9cb397914e
Notes:
github-actions[bot]
2024-12-20 08:38:50 +00:00
Author: https://github.com/R-Goc Commit: https://github.com/LadybirdBrowser/ladybird/commit/9cb397914e2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2945 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/shlyakpavel
1 changed files with 1 additions and 1 deletions
|
@ -96,12 +96,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_SIMULATE_ID MATCHES
|
|||
|
||||
add_cxx_compile_options(-Wno-implicit-const-int-float-conversion)
|
||||
add_cxx_compile_options(-Wno-user-defined-literals)
|
||||
add_cxx_compile_options(-Wno-vla-cxx-extension)
|
||||
add_cxx_compile_options(-Wno-unqualified-std-cast-call)
|
||||
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_cxx_compile_options(-Wno-expansion-to-defined)
|
||||
add_cxx_compile_options(-Wno-literal-suffix)
|
||||
add_cxx_compile_options(-Wvla)
|
||||
|
||||
# FIXME: This warning seems useful but has too many false positives with GCC 13.
|
||||
add_cxx_compile_options(-Wno-dangling-reference)
|
||||
|
|
Loading…
Add table
Reference in a new issue