summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-05-18 19:28:51 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2020-05-19 02:33:13 (GMT)
commit22b61f470acc54afad5705dea23a7a8423e65cff (patch)
treea8d6d4be22e69b92f7e51a00711578de13614255 /config
parent0d88516c2eafcd4ca538442afe21caf4ff1aeb1f (diff)
downloadhdf5-22b61f470acc54afad5705dea23a7a8423e65cff.zip
hdf5-22b61f470acc54afad5705dea23a7a8423e65cff.tar.gz
hdf5-22b61f470acc54afad5705dea23a7a8423e65cff.tar.bz2
Revise gnu-*flags and cmake/HDF*CompilerFlags.cmake files to add warning
flags for GCC compilers version 4.8 and above. Removed files from gnu-warnings that only apply to versions < 4.8. Consolidated warnings from versions < 4.8 that apply to versions >= 4.8 into the 4.8 warnings files.
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake71
-rw-r--r--config/cmake/HDFCompilerFlags.cmake74
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake19
-rw-r--r--config/gnu-cxxflags67
-rw-r--r--config/gnu-fflags19
-rw-r--r--config/gnu-flags69
-rw-r--r--config/gnu-warnings/4.2-4.33
-rw-r--r--config/gnu-warnings/4.2-4.42
-rw-r--r--config/gnu-warnings/4.2-4.62
-rw-r--r--config/gnu-warnings/4.32
-rw-r--r--config/gnu-warnings/4.43
-rw-r--r--config/gnu-warnings/4.51
-rw-r--r--config/gnu-warnings/4.5-4.63
-rw-r--r--config/gnu-warnings/4.62
-rw-r--r--config/gnu-warnings/4.75
-rw-r--r--config/gnu-warnings/4.824
-rw-r--r--config/gnu-warnings/4.8-4.last (renamed from config/gnu-warnings/4.2-4.last)0
-rw-r--r--config/gnu-warnings/developer-4.57
-rw-r--r--config/gnu-warnings/developer-4.61
-rw-r--r--config/gnu-warnings/developer-4.77
-rw-r--r--config/gnu-warnings/developer-4.822
-rw-r--r--config/gnu-warnings/gfort-4.42
-rw-r--r--config/gnu-warnings/gfort-4.51
-rw-r--r--config/gnu-warnings/gfort-4.72
-rw-r--r--config/gnu-warnings/gfort-4.812
-rw-r--r--config/gnu-warnings/no-developer-4.51
-rw-r--r--config/gnu-warnings/no-developer-4.61
-rw-r--r--config/gnu-warnings/no-developer-4.72
-rw-r--r--config/gnu-warnings/no-developer-4.812
29 files changed, 99 insertions, 337 deletions
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index 47991bf..02bf5cd 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -86,9 +86,8 @@ if (NOT MSVC)
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED
- AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- # autotools adds the C flags with the CXX flags for g++ compiler
- # versions 4.2 and above.
+ AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ # add the general CXX flags for g++ compiler versions 4.8 and above.
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
endif ()
@@ -127,71 +126,9 @@ if (NOT MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... Only needed for gcc 4.X
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
# autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.last")
- endif ()
- # Append warning flags that only gcc 4.3+ knows about
- # autotools always add the C flags with the CXX flags
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.3")
- endif()
-
- # Append more extra warning flags that only gcc 4.4+ know about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.4")
- endif ()
-
- # Append more extra warning flags that only gcc 4.5+ know about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.5")
- if (HDF5_ENABLE_DEV_WARNINGS)
- # autotools always add the C flags with the CXX flags
- #ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.5")
- else ()
- # autotools always add the C flags with the CXX flags
- #ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.5")
- endif ()
- endif ()
-
- # Append more extra warning flags that only gcc 4.6 and less know about
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.2)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.6")
- endif ()
-
- # Append more extra warning flags that only gcc 4.5-4.6 know about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5 AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.5-4.6")
- endif ()
-
- # Append more extra warning flags that only gcc 4.6+ know about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.6")
- if (HDF5_ENABLE_DEV_WARNINGS)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.6")
- else ()
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.6")
- endif ()
- endif ()
-
- # Append more extra warning flags that only gcc 4.7+ know about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.7")
- if (HDF5_ENABLE_DEV_WARNINGS)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.7")
- else ()
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.7")
- endif ()
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
# Append more extra warning flags that only gcc 4.8+ know about
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 6dbaa64..cd4ab48 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -93,11 +93,9 @@ if (NOT MSVC)
list (APPEND H5_CFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings")
endif()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- # Add general CFlags for GCC versions 4.2 and above
- if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
- endif ()
+ # Add general CFlags for GCC versions 4.8 and above
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
endif ()
# gcc automatically inlines based on the optimization level
@@ -121,13 +119,13 @@ if (NOT MSVC)
message (STATUS "....HDF5 developer group warnings are enabled")
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
list (APPEND H5_CFLAGS0 "-Winline -Wreorder -Wport -Wstrict-aliasing")
- elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
else ()
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
@@ -138,68 +136,8 @@ if (NOT MSVC)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... Only needed for gcc 4.X
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.last")
- endif ()
-
- # Append warning flags for gcc 4.2-4.3
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL 4.3 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.3")
- endif ()
-
- # Append warning flags for gcc 4.2-4.4
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL 4.4 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.4")
- endif ()
-
- # Append warning flags that only gcc 4.3+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.3")
- endif ()
-
- # Append more extra warning flags that only gcc 4.4+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.4")
- endif ()
-
- # Append more extra warning flags that only gcc 4.5+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.5")
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.5")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.5")
- endif ()
- endif ()
-
- # Append more extra warning flags that only gcc 4.6 and less know about
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.6")
- endif ()
-
- # Append more extra warning flags that only gcc 4.5-4.6 know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5 AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.5-4.6")
- endif ()
-
- # Append more extra warning flags that only gcc 4.6+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.6")
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.6")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.6")
- endif ()
- endif ()
-
- # Append more extra warning flags that only gcc 4.7+ know about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.7")
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.7")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.7")
- endif ()
+ if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
# Append more extra warning flags that only gcc 4.8+ know about
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 495a0ca..15edaa8 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -67,23 +67,6 @@ if (NOT MSVC)
message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
- # Append warning flags that only gcc 4.4+ knows about
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.4")
-
- # Append more extra warning flags that only gcc 4.5+ know about
- if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.5)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.5")
- endif ()
-
- # Append more extra warning flags that only gcc 4.6+ know about
- #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
- # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.6")
- #endif ()
-
- # Append more extra warning flags that only gcc 4.7+ know about
- if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.7)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.7")
- endif ()
# Append more extra warning flags that only gcc 4.8+ know about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
@@ -95,7 +78,7 @@ if (NOT MSVC)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.9")
#endif ()
- # Append more extra warning flags that only gcc 5.1+ know about
+ # Append more extra warning flags that only gcc 5.x+ know about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
endif ()
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index b2ef36d..44cbc69 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -180,82 +180,33 @@ if test "X-g++" = "X-$cxx_vendor"; then
# General #
###########
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -gt 4; then
+ # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later.
+ if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)"
- fi
######################
# Developer warnings #
######################
- NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
- DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
+ NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
+ DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
+
+ fi
#######################
# gcc 4 special cases #
#######################
- # GCC 4.2 through 4.6
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 6; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.6)"
- fi
-
- # GCC 4.2 through 4.3
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 3; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.3)"
- fi
-
- # GCC 4.5 through 4.6
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 6; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.5-4.6)"
- fi
-
- # GCC 4.2 through 4.4
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -a $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 4; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.4)"
- fi
-
- # GCC 4.2 through the end of GCC 4 series
- if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.last)"
+ # GCC 4.8 through the end of GCC 4 series
+ if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)"
fi
#############################
# Version-specific warnings #
#############################
- # gcc >= 4.3
- if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 3; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.3)"
- fi
-
- # gcc >= 4.4
- if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 4; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.4)"
- fi
-
- # gcc >= 4.5
- if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 5; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.5)"
- #DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.5)"
- #NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.5)"
- fi
-
- # gcc >= 4.6
- if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 6; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.6)"
- DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.6)"
- NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.6)"
- fi
-
- # gcc >= 4.7
- if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 7; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.7)"
- DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.7)"
- NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.7)"
- fi
-
# gcc >= 4.8
if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8)"
diff --git a/config/gnu-fflags b/config/gnu-fflags
index eb3519c..105a990 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -145,25 +145,6 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# Version-specific warnings #
#############################
- # gfortran 4.3 (nothing new)
-
- # gfortran >= 4.4
- if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 4; then
- H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.4)"
- fi
-
- # gfortran >= 4.5
- if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then
- H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.5)"
- fi
-
- # gfortran 4.6 (nothing new)
-
- # gfortran >= 4.7
- if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 7; then
- H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.7)"
- fi
-
# 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)"
diff --git a/config/gnu-flags b/config/gnu-flags
index 7e69ede..7cf90b8 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -188,84 +188,33 @@ if test "X-gcc" = "X-$cc_vendor"; then
# General #
###########
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -gt 4; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)"
- fi
+ # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later.
if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)"
- fi
######################
# Developer warnings #
######################
- NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general)
- DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general)
+ NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general)
+ DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general)
+
+ fi
#######################
# gcc 4 special cases #
#######################
- # GCC 4.2 through 4.6
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 6; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.2-4.6)"
- fi
-
- # GCC 4.2 through 4.3
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 3; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.2-4.3)"
- fi
-
- # GCC 4.5 through 4.6
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 6; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.5-4.6)"
- fi
-
- # GCC 4.2 through 4.4
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -a $cc_vers_major -eq 4 -a $cc_vers_minor -le 4; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.2-4.4)"
- fi
-
- # GCC 4.2 through the end of GCC 4 series
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.2-4.last)"
+ # GCC 4.8 through the end of GCC 4 series
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8-4.last)"
fi
#############################
# Version-specific warnings #
#############################
- # gcc >= 4.3
- if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 3; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.3)"
- fi
-
- # gcc >= 4.4
- if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 4; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.4)"
- fi
-
- # gcc >= 4.5
- if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.5)"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-4.5)"
- NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-4.5)"
- fi
-
- # gcc >= 4.6
- if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 6; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.6)"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-4.6)"
- NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-4.6)"
- fi
-
- # gcc >= 4.7
- if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 7; then
- H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.7)"
- DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-4.7)"
- NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-4.7)"
- fi
-
# gcc >= 4.8
if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 4.8)"
diff --git a/config/gnu-warnings/4.2-4.3 b/config/gnu-warnings/4.2-4.3
deleted file mode 100644
index 1881797..0000000
--- a/config/gnu-warnings/4.2-4.3
+++ /dev/null
@@ -1,3 +0,0 @@
-# -Wvolatile-register-var was later incorporated into -Wall and
-# only needs to be specified explicitly for gcc 4.2-4.3
--Wvolatile-register-var
diff --git a/config/gnu-warnings/4.2-4.4 b/config/gnu-warnings/4.2-4.4
deleted file mode 100644
index ec4876f..0000000
--- a/config/gnu-warnings/4.2-4.4
+++ /dev/null
@@ -1,2 +0,0 @@
-# The non-valued form of -Wstrict-overflow is used in gcc 4.2-4.4
--Wstrict-overflow
diff --git a/config/gnu-warnings/4.2-4.6 b/config/gnu-warnings/4.2-4.6
deleted file mode 100644
index 37df4ab..0000000
--- a/config/gnu-warnings/4.2-4.6
+++ /dev/null
@@ -1,2 +0,0 @@
-# Disable warnings about using the 'long long' type w/ gcc 4.6 and earlier
--Wno-long-long
diff --git a/config/gnu-warnings/4.3 b/config/gnu-warnings/4.3
deleted file mode 100644
index 13d8558..0000000
--- a/config/gnu-warnings/4.3
+++ /dev/null
@@ -1,2 +0,0 @@
--Wlarger-than=2560
--Wlogical-op
diff --git a/config/gnu-warnings/4.4 b/config/gnu-warnings/4.4
deleted file mode 100644
index 42929b5..0000000
--- a/config/gnu-warnings/4.4
+++ /dev/null
@@ -1,3 +0,0 @@
--Wframe-larger-than=16384
--Wpacked-bitfield-compat
--Wsync-nand
diff --git a/config/gnu-warnings/4.5 b/config/gnu-warnings/4.5
deleted file mode 100644
index ddb96df..0000000
--- a/config/gnu-warnings/4.5
+++ /dev/null
@@ -1 +0,0 @@
--Wstrict-overflow=5
diff --git a/config/gnu-warnings/4.5-4.6 b/config/gnu-warnings/4.5-4.6
deleted file mode 100644
index d3035fe..0000000
--- a/config/gnu-warnings/4.5-4.6
+++ /dev/null
@@ -1,3 +0,0 @@
-# -Wstrict-aliasing was later incorporated into -Wall and
-# only needs to be specified explicitly for gcc 4.5-4.6
--Wstrict-aliasing
diff --git a/config/gnu-warnings/4.6 b/config/gnu-warnings/4.6
deleted file mode 100644
index 140a20c..0000000
--- a/config/gnu-warnings/4.6
+++ /dev/null
@@ -1,2 +0,0 @@
--Wdouble-promotion
--Wtrampolines
diff --git a/config/gnu-warnings/4.7 b/config/gnu-warnings/4.7
deleted file mode 100644
index c47fe4b..0000000
--- a/config/gnu-warnings/4.7
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# -Wstack-usage=8192 warnings need to be swept up on a branch so
-# that we can stop burdening the whole development team.
-#
--Wstack-usage=8192
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8
index 5dc577f..c7e3dd1 100644
--- a/config/gnu-warnings/4.8
+++ b/config/gnu-warnings/4.8
@@ -1 +1,25 @@
+# warning flags added for GCC >= 4.3
+-Wlarger-than=2560
+-Wlogical-op
+
+# warning flags added for GCC >= 4.4
+-Wframe-larger-than=16384
+-Wpacked-bitfield-compat
+-Wsync-nand
+
+# warning flag added for GCC >= 4.5
+-Wstrict-overflow=5
+
+# warning flags added for GCC >= 4.6
+-Wdouble-promotion
+-Wtrampolines
+
+# warning flag added for GCC >= 4.7
+#
+# -Wstack-usage=8192 warnings need to be swept up on a branch so
+# that we can stop burdening the whole development team.
+#
+-Wstack-usage=8192
+
+# warning flag added for GCC >= 4.8
-Wmaybe-uninitialized
diff --git a/config/gnu-warnings/4.2-4.last b/config/gnu-warnings/4.8-4.last
index 2db90fb..2db90fb 100644
--- a/config/gnu-warnings/4.2-4.last
+++ b/config/gnu-warnings/4.8-4.last
diff --git a/config/gnu-warnings/developer-4.5 b/config/gnu-warnings/developer-4.5
deleted file mode 100644
index 48df846..0000000
--- a/config/gnu-warnings/developer-4.5
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# -Wjump-misses-init makes lots of noise for a questionable benefit.
-# Can jumping over an initialization in C cause any harm, if
-# the variable is never *used* before it has been initialized?
-#
--Wjump-misses-init
--Wunsuffixed-float-constants
diff --git a/config/gnu-warnings/developer-4.6 b/config/gnu-warnings/developer-4.6
deleted file mode 100644
index 2372fbf..0000000
--- a/config/gnu-warnings/developer-4.6
+++ /dev/null
@@ -1 +0,0 @@
--Wsuggest-attribute=const
diff --git a/config/gnu-warnings/developer-4.7 b/config/gnu-warnings/developer-4.7
deleted file mode 100644
index a3b0781..0000000
--- a/config/gnu-warnings/developer-4.7
+++ /dev/null
@@ -1,7 +0,0 @@
--Wsuggest-attribute=noreturn
--Wsuggest-attribute=pure
-#
-# It's not clear that -Wvector-operation-performance warnings are
-# actionable, so they are demoted to "developer" warnings.
-#
--Wvector-operation-performance
diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8
index b0109e2..fd76f6c 100644
--- a/config/gnu-warnings/developer-4.8
+++ b/config/gnu-warnings/developer-4.8
@@ -1 +1,23 @@
+# developer warning flags added for GCC >= 4.5
+#
+# -Wjump-misses-init makes lots of noise for a questionable benefit.
+# Can jumping over an initialization in C cause any harm, if
+# the variable is never *used* before it has been initialized?
+#
+-Wjump-misses-init
+-Wunsuffixed-float-constants
+
+# developer warning flag added for GCC >= 4.6
+-Wsuggest-attribute=const
+
+# developer warning flags added for GCC >= 4.7
+-Wsuggest-attribute=noreturn
+-Wsuggest-attribute=pure
+#
+# It's not clear that -Wvector-operation-performance warnings are
+# actionable, so they are demoted to "developer" warnings.
+#
+-Wvector-operation-performance
+
+# developer warning flag added for GCC >= 4.8
-Wsuggest-attribute=format
diff --git a/config/gnu-warnings/gfort-4.4 b/config/gnu-warnings/gfort-4.4
deleted file mode 100644
index 59fe9a2..0000000
--- a/config/gnu-warnings/gfort-4.4
+++ /dev/null
@@ -1,2 +0,0 @@
--Warray-temporaries
--Wintrinsics-std \ No newline at end of file
diff --git a/config/gnu-warnings/gfort-4.5 b/config/gnu-warnings/gfort-4.5
deleted file mode 100644
index 4490d4e..0000000
--- a/config/gnu-warnings/gfort-4.5
+++ /dev/null
@@ -1 +0,0 @@
--Wimplicit-procedure
diff --git a/config/gnu-warnings/gfort-4.7 b/config/gnu-warnings/gfort-4.7
deleted file mode 100644
index a7532bb..0000000
--- a/config/gnu-warnings/gfort-4.7
+++ /dev/null
@@ -1,2 +0,0 @@
--Wreal-q-constant
--Wfunction-elimination
diff --git a/config/gnu-warnings/gfort-4.8 b/config/gnu-warnings/gfort-4.8
index 1b96a51..9d880de 100644
--- a/config/gnu-warnings/gfort-4.8
+++ b/config/gnu-warnings/gfort-4.8
@@ -1,3 +1,15 @@
+# warning flags added for gfortran >= 4.4
+-Warray-temporaries
+-Wintrinsics-std
+
+# warning flag added for gfortran >= 4.5
+-Wimplicit-procedure
+
+# warning flags added for gfortran >= 4.7
+-Wreal-q-constant
+-Wfunction-elimination
+
+# warning flags added for gfortran >= 4.8
-Wrealloc-lhs
-Wrealloc-lhs-all
# Turn off warnings for passing non-ANSI types to BIND().
diff --git a/config/gnu-warnings/no-developer-4.5 b/config/gnu-warnings/no-developer-4.5
deleted file mode 100644
index ef7d38f..0000000
--- a/config/gnu-warnings/no-developer-4.5
+++ /dev/null
@@ -1 +0,0 @@
--Wno-unsuffixed-float-constants
diff --git a/config/gnu-warnings/no-developer-4.6 b/config/gnu-warnings/no-developer-4.6
deleted file mode 100644
index ea9cc66..0000000
--- a/config/gnu-warnings/no-developer-4.6
+++ /dev/null
@@ -1 +0,0 @@
--Wno-suggest-attribute=const
diff --git a/config/gnu-warnings/no-developer-4.7 b/config/gnu-warnings/no-developer-4.7
deleted file mode 100644
index 5b85e1f..0000000
--- a/config/gnu-warnings/no-developer-4.7
+++ /dev/null
@@ -1,2 +0,0 @@
--Wno-suggest-attribute=noreturn
--Wno-suggest-attribute=pure
diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8
index e42e09f..1e29c78 100644
--- a/config/gnu-warnings/no-developer-4.8
+++ b/config/gnu-warnings/no-developer-4.8
@@ -1 +1,13 @@
+# no-developer warning flag added for GCC >= 4.5
+-Wno-jump-misses-init
+-Wno-unsuffixed-float-constants
+
+# no-developer warning flag added for GCC >= 4.6
+-Wno-suggest-attribute=const
+
+# no-developer warning flags added for GCC >= 4.7
+-Wno-suggest-attribute=noreturn
+-Wno-suggest-attribute=pure
+
+# no-developer warning flag added for GCC >= 4.8
-Wno-suggest-attribute=format