diff options
Diffstat (limited to 'config/cmake/HDFCompilerFlags.cmake')
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 4712f50..106d6d7 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -143,7 +143,7 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC) # # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... -QAK - set (H5_CFLAGS1 "${H5_CFLAGS1} -Wlogical-op -Wlarger-than=2048 -Wvla") + set (H5_CFLAGS1 "${H5_CFLAGS1} -Wlogical-op -Wlarger-than=2560 -Wvla") # Append more extra warning flags that only gcc 4.4+ know about set (H5_CFLAGS1 "${H5_CFLAGS1} -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat") @@ -203,6 +203,11 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC) set (H5_CFLAGS4 "${H5_CFLAGS4} -Walloc-zero -Walloca -Wduplicated-branches -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wrestrict") endif () + # Append more extra warning flags that only gcc 8.x+ know about + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) + set (H5_CFLAGS4 "${H5_CFLAGS4} -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2 -Wno-suggest-attribute=cold -Wno-suggest-attribute=malloc") + endif () + endif () #----------------------------------------------------------------------------- |