summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/HDFCompilerFlags.cmake5
-rw-r--r--config/gnu-flags1
2 files changed, 5 insertions, 1 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 106d6d7..d658c48 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -208,6 +208,11 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
set (H5_CFLAGS4 "${H5_CFLAGS4} -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2 -Wno-suggest-attribute=cold -Wno-suggest-attribute=malloc")
endif ()
+ # Append more extra warning flags that only gcc 9.x+ know about
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
+ set (H5_CFLAGS4 "${H5_CFLAGS4} Wattribute-alias=2 -Wmissing-profile")
+ endif ()
+
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/gnu-flags b/config/gnu-flags
index c5c70eb..f401d3d 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -241,7 +241,6 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2"
# Append warning flags that only gcc 9.x+ knows about
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS "
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias=2 -Wmissing-profile"
;;