diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-01-03 14:18:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 14:18:48 (GMT) |
commit | 83f81a64222e61c8cc25e48ccefa700631006aab (patch) | |
tree | 0864fdb966ec3062d1e03f0c46aa6bc9037e10f1 | |
parent | d326f6fae80c090419d0178bb3e799fd50e78df5 (diff) | |
download | hdf5-83f81a64222e61c8cc25e48ccefa700631006aab.zip hdf5-83f81a64222e61c8cc25e48ccefa700631006aab.tar.gz hdf5-83f81a64222e61c8cc25e48ccefa700631006aab.tar.bz2 |
Adds -Warray-temporaries to the developer warnings (#2385)
These generate a LOT of noise that we are not going to address anytime
soon.
-rw-r--r-- | config/cmake/HDFFortranCompilerFlags.cmake | 5 | ||||
-rw-r--r-- | config/gnu-fflags | 2 | ||||
-rw-r--r-- | config/gnu-warnings/gfort-4.8 | 1 | ||||
-rw-r--r-- | config/gnu-warnings/gfort-developer-4.8 | 3 | ||||
-rw-r--r-- | config/gnu-warnings/gfort-no-developer-4.8 | 3 |
5 files changed, 13 insertions, 1 deletions
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 108a4e9..86d0431 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -79,6 +79,11 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 4.8+ knows about if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8) ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8") + if (HDF5_ENABLE_DEV_WARNINGS) + ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-4.8") + else () + ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-4.8") + endif () endif () # Append more extra warning flags that only gcc 4.9+ knows about diff --git a/config/gnu-fflags b/config/gnu-fflags index c43f416..b3385ec 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -159,6 +159,8 @@ if test "X-gfortran" = "X-$f9x_vendor"; then # gfortran >= 4.8 if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 8; then H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.8)" + DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-4.8)" + NO_DEVELOPER_WARNING_FCFLAGS="$NO_DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-no-developer-4.8)" fi # gfortran 4.9 (nothing new) diff --git a/config/gnu-warnings/gfort-4.8 b/config/gnu-warnings/gfort-4.8 index 9d880de..f986072 100644 --- a/config/gnu-warnings/gfort-4.8 +++ b/config/gnu-warnings/gfort-4.8 @@ -1,5 +1,4 @@ # warning flags added for gfortran >= 4.4 --Warray-temporaries -Wintrinsics-std # warning flag added for gfortran >= 4.5 diff --git a/config/gnu-warnings/gfort-developer-4.8 b/config/gnu-warnings/gfort-developer-4.8 new file mode 100644 index 0000000..20effdc --- /dev/null +++ b/config/gnu-warnings/gfort-developer-4.8 @@ -0,0 +1,3 @@ +# warning flags added for gfortran >= 4.4 +-Warray-temporaries + diff --git a/config/gnu-warnings/gfort-no-developer-4.8 b/config/gnu-warnings/gfort-no-developer-4.8 new file mode 100644 index 0000000..82274ef --- /dev/null +++ b/config/gnu-warnings/gfort-no-developer-4.8 @@ -0,0 +1,3 @@ +# warning flags added for gfortran >= 4.4 +-Wno-array-temporaries + |