From 2f09d8f3c8a4a44932c1b8ffb0f6ea2219059a5c Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 18 Mar 2020 21:12:53 -0500 Subject: Move the GNU warnings configuration under config/gnu-warnings/ and trim the filename prefixes. Update config/gnu-flags to suit. I also made changes to config/cmake/HDFCompilerFlags.cmake, but I'm not sure they're correct. --- config/cmake/HDFCompilerFlags.cmake | 6 +-- config/gnu-flags | 70 ++++++++++++++++---------------- config/gnu-warnings-4.2-4.3 | 3 -- config/gnu-warnings-4.2-4.4 | 2 - config/gnu-warnings-4.2-4.6 | 2 - config/gnu-warnings-4.2-4.last | 3 -- config/gnu-warnings-4.3 | 2 - config/gnu-warnings-4.4 | 3 -- config/gnu-warnings-4.5 | 1 - config/gnu-warnings-4.5-4.6 | 3 -- config/gnu-warnings-4.6 | 2 - config/gnu-warnings-4.7 | 5 --- config/gnu-warnings-4.8 | 1 - config/gnu-warnings-4.9 | 1 - config/gnu-warnings-5 | 2 - config/gnu-warnings-6 | 9 ---- config/gnu-warnings-7 | 7 ---- config/gnu-warnings-8 | 3 -- config/gnu-warnings-9 | 2 - config/gnu-warnings-developer-4.5 | 7 ---- config/gnu-warnings-developer-4.6 | 1 - config/gnu-warnings-developer-4.7 | 7 ---- config/gnu-warnings-developer-4.8 | 1 - config/gnu-warnings-developer-7 | 1 - config/gnu-warnings-developer-8 | 3 -- config/gnu-warnings-developer-general | 13 ------ config/gnu-warnings-general | 32 --------------- config/gnu-warnings-no-developer-4.5 | 1 - config/gnu-warnings-no-developer-4.6 | 1 - config/gnu-warnings-no-developer-4.7 | 2 - config/gnu-warnings-no-developer-4.8 | 1 - config/gnu-warnings-no-developer-8 | 2 - config/gnu-warnings-no-developer-general | 4 -- config/gnu-warnings/4.2-4.3 | 3 ++ config/gnu-warnings/4.2-4.4 | 2 + config/gnu-warnings/4.2-4.6 | 2 + config/gnu-warnings/4.2-4.last | 3 ++ config/gnu-warnings/4.3 | 2 + config/gnu-warnings/4.4 | 3 ++ config/gnu-warnings/4.5 | 1 + config/gnu-warnings/4.5-4.6 | 3 ++ config/gnu-warnings/4.6 | 2 + config/gnu-warnings/4.7 | 5 +++ config/gnu-warnings/4.8 | 1 + config/gnu-warnings/4.9 | 1 + config/gnu-warnings/5 | 2 + config/gnu-warnings/6 | 9 ++++ config/gnu-warnings/7 | 7 ++++ config/gnu-warnings/8 | 3 ++ config/gnu-warnings/9 | 2 + config/gnu-warnings/developer-4.5 | 7 ++++ config/gnu-warnings/developer-4.6 | 1 + config/gnu-warnings/developer-4.7 | 7 ++++ config/gnu-warnings/developer-4.8 | 1 + config/gnu-warnings/developer-7 | 1 + config/gnu-warnings/developer-8 | 3 ++ config/gnu-warnings/developer-general | 13 ++++++ config/gnu-warnings/error-5 | 12 ++++++ config/gnu-warnings/error-8 | 9 ++++ config/gnu-warnings/error-general | 24 +++++++++++ config/gnu-warnings/general | 32 +++++++++++++++ config/gnu-warnings/no-developer-4.5 | 1 + config/gnu-warnings/no-developer-4.6 | 1 + config/gnu-warnings/no-developer-4.7 | 2 + config/gnu-warnings/no-developer-4.8 | 1 + config/gnu-warnings/no-developer-8 | 2 + config/gnu-warnings/no-developer-general | 4 ++ config/gnu-werrors-5 | 12 ------ config/gnu-werrors-8 | 9 ---- config/gnu-werrors-general | 24 ----------- 70 files changed, 210 insertions(+), 210 deletions(-) delete mode 100644 config/gnu-warnings-4.2-4.3 delete mode 100644 config/gnu-warnings-4.2-4.4 delete mode 100644 config/gnu-warnings-4.2-4.6 delete mode 100644 config/gnu-warnings-4.2-4.last delete mode 100644 config/gnu-warnings-4.3 delete mode 100644 config/gnu-warnings-4.4 delete mode 100644 config/gnu-warnings-4.5 delete mode 100644 config/gnu-warnings-4.5-4.6 delete mode 100644 config/gnu-warnings-4.6 delete mode 100644 config/gnu-warnings-4.7 delete mode 100644 config/gnu-warnings-4.8 delete mode 100644 config/gnu-warnings-4.9 delete mode 100644 config/gnu-warnings-5 delete mode 100644 config/gnu-warnings-6 delete mode 100644 config/gnu-warnings-7 delete mode 100644 config/gnu-warnings-8 delete mode 100644 config/gnu-warnings-9 delete mode 100644 config/gnu-warnings-developer-4.5 delete mode 100644 config/gnu-warnings-developer-4.6 delete mode 100644 config/gnu-warnings-developer-4.7 delete mode 100644 config/gnu-warnings-developer-4.8 delete mode 100644 config/gnu-warnings-developer-7 delete mode 100644 config/gnu-warnings-developer-8 delete mode 100644 config/gnu-warnings-developer-general delete mode 100644 config/gnu-warnings-general delete mode 100644 config/gnu-warnings-no-developer-4.5 delete mode 100644 config/gnu-warnings-no-developer-4.6 delete mode 100644 config/gnu-warnings-no-developer-4.7 delete mode 100644 config/gnu-warnings-no-developer-4.8 delete mode 100644 config/gnu-warnings-no-developer-8 delete mode 100644 config/gnu-warnings-no-developer-general create mode 100644 config/gnu-warnings/4.2-4.3 create mode 100644 config/gnu-warnings/4.2-4.4 create mode 100644 config/gnu-warnings/4.2-4.6 create mode 100644 config/gnu-warnings/4.2-4.last create mode 100644 config/gnu-warnings/4.3 create mode 100644 config/gnu-warnings/4.4 create mode 100644 config/gnu-warnings/4.5 create mode 100644 config/gnu-warnings/4.5-4.6 create mode 100644 config/gnu-warnings/4.6 create mode 100644 config/gnu-warnings/4.7 create mode 100644 config/gnu-warnings/4.8 create mode 100644 config/gnu-warnings/4.9 create mode 100644 config/gnu-warnings/5 create mode 100644 config/gnu-warnings/6 create mode 100644 config/gnu-warnings/7 create mode 100644 config/gnu-warnings/8 create mode 100644 config/gnu-warnings/9 create mode 100644 config/gnu-warnings/developer-4.5 create mode 100644 config/gnu-warnings/developer-4.6 create mode 100644 config/gnu-warnings/developer-4.7 create mode 100644 config/gnu-warnings/developer-4.8 create mode 100644 config/gnu-warnings/developer-7 create mode 100644 config/gnu-warnings/developer-8 create mode 100644 config/gnu-warnings/developer-general create mode 100644 config/gnu-warnings/error-5 create mode 100644 config/gnu-warnings/error-8 create mode 100644 config/gnu-warnings/error-general create mode 100644 config/gnu-warnings/general create mode 100644 config/gnu-warnings/no-developer-4.5 create mode 100644 config/gnu-warnings/no-developer-4.6 create mode 100644 config/gnu-warnings/no-developer-4.7 create mode 100644 config/gnu-warnings/no-developer-4.8 create mode 100644 config/gnu-warnings/no-developer-8 create mode 100644 config/gnu-warnings/no-developer-general delete mode 100644 config/gnu-werrors-5 delete mode 100644 config/gnu-werrors-8 delete mode 100644 config/gnu-werrors-general diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 17b0854..c395193 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -128,7 +128,7 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC) set (H5_CFLAGS0 "${H5_CFLAGS0} -Wsign-compare -Wtrigraphs -Wwrite-strings") endif() elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU") - ADD_H5_FLAGS (CMAKE_C_FLAGS_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings-general") + ADD_H5_FLAGS (CMAKE_C_FLAGS_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings/general") message (STATUS "CMAKE_C_FLAGS_GENERAL=${CMAKE_C_FLAGS_GENERAL}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_GENERAL}") set (H5_CFLAGS0 "${H5_CFLAGS0} -Wbad-function-cast -Wcast-align") @@ -154,12 +154,12 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC) if (CMAKE_C_COMPILER_ID STREQUAL "Intel") set (H5_CFLAGS0 "${H5_CFLAGS0} -Winline -Wreorder -Wport -Wstrict-aliasing") elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU") - ADD_H5_FLAGS (CMAKE_C_FLAGS_DEV_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings-developer-general") + ADD_H5_FLAGS (CMAKE_C_FLAGS_DEV_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") set (H5_CFLAGS0 "${H5_CFLAGS0} ${CMAKE_C_FLAGS_DEV_GENERAL}") endif () else () if (CMAKE_C_COMPILER_ID STREQUAL "GNU") - ADD_H5_FLAGS (CMAKE_C_FLAGS_NO_DEV_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings-no-developer-general") + ADD_H5_FLAGS (CMAKE_C_FLAGS_NO_DEV_GENERAL "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") set (H5_CFLAGS0 "${H5_CFLAGS0} ${CMAKE_C_FLAGS_NO_DEV_GENERAL}") endif () endif () diff --git a/config/gnu-flags b/config/gnu-flags index 61a1bfd..1310769 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -44,7 +44,7 @@ demote_errors() load_gcc_arguments() { set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/gnu-${arg} | demote_errors + sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors done) IFS=' ' echo "$*" } @@ -189,15 +189,15 @@ if test "X-gcc" = "X-$cc_vendor"; then # General # ########### - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-general)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments werrors-general)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments general)" + H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments error-general)" ###################### # Developer warnings # ###################### - NO_DEVELOPER_WARNING_CFLAGS=$(load_gcc_arguments warnings-no-developer-general) - DEVELOPER_WARNING_CFLAGS=$(load_gcc_arguments warnings-developer-general) + NO_DEVELOPER_WARNING_CFLAGS=$(load_gcc_arguments no-developer-general) + DEVELOPER_WARNING_CFLAGS=$(load_gcc_arguments developer-general) ####################### # gcc 4 special cases # @@ -205,27 +205,27 @@ if test "X-gcc" = "X-$cc_vendor"; then # 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_gcc_arguments warnings-4.2-4.6)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.2-4.3)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.5-4.6)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.2-4.4)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.2-4.last)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.2-4.last)" fi ############################# @@ -234,75 +234,75 @@ if test "X-gcc" = "X-$cc_vendor"; then # 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_gcc_arguments warnings-4.3)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.4)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.5)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-4.5)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-no-developer-4.5)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.5)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-4.5)" + NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.6)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-4.6)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-no-developer-4.6)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.6)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-4.6)" + NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.7)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-4.7)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-no-developer-4.7)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.7)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-4.7)" + NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_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_gcc_arguments warnings-4.8)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-4.8)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-no-developer-4.8)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.8)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-4.8)" + NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments no-developer-4.8)" fi # gcc >= 4.9 if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 9; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-4.9)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 4.9)" fi # gcc >= 5 if test $cc_vers_major -ge 5; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-5)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments werrors-5)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 5)" + H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments error-5)" fi # gcc >= 6 if test $cc_vers_major -ge 6; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-6)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 6)" fi # gcc >= 7 if test $cc_vers_major -ge 7; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-7)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-7)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 7)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-7)" fi # gcc 8 if test $cc_vers_major -ge 8; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-8)" - H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments werrors-8)" - DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-developer-8)" - NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments warnings-no-developer-8)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 8)" + H5_ECFLAGS="$H5_ECFLAGS $(load_gcc_arguments error-8)" + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments developer-8)" + NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gcc_arguments no-developer-8)" fi # gcc 9 if test $cc_vers_major -ge 9; then - H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments warnings-9)" + H5_CFLAGS="$H5_CFLAGS $(load_gcc_arguments 9)" fi ################# 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.2-4.last b/config/gnu-warnings-4.2-4.last deleted file mode 100644 index 2db90fb..0000000 --- a/config/gnu-warnings-4.2-4.last +++ /dev/null @@ -1,3 +0,0 @@ -# -Wvla was later incorporated into -Wpedantic and -# only needs to be specified explicitly for gcc 4 --Wvla 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 deleted file mode 100644 index 5dc577f..0000000 --- a/config/gnu-warnings-4.8 +++ /dev/null @@ -1 +0,0 @@ --Wmaybe-uninitialized diff --git a/config/gnu-warnings-4.9 b/config/gnu-warnings-4.9 deleted file mode 100644 index 78aa929..0000000 --- a/config/gnu-warnings-4.9 +++ /dev/null @@ -1 +0,0 @@ --Wdate-time diff --git a/config/gnu-warnings-5 b/config/gnu-warnings-5 deleted file mode 100644 index 32cb196..0000000 --- a/config/gnu-warnings-5 +++ /dev/null @@ -1,2 +0,0 @@ --Warray-bounds=2 --Wc99-c11-compat diff --git a/config/gnu-warnings-6 b/config/gnu-warnings-6 deleted file mode 100644 index 736a446..0000000 --- a/config/gnu-warnings-6 +++ /dev/null @@ -1,9 +0,0 @@ -# -# Careful! -Wduplicated-cond, combined with HDF5's heavy use of -# macros, can make a lot of noise. -# --Wduplicated-cond --Whsa --Wnormalized --Wnull-dereference --Wunused-const-variable diff --git a/config/gnu-warnings-7 b/config/gnu-warnings-7 deleted file mode 100644 index 266f5c1..0000000 --- a/config/gnu-warnings-7 +++ /dev/null @@ -1,7 +0,0 @@ --Walloca --Walloc-zero --Wduplicated-branches --Wformat-overflow=2 --Wformat-truncation=1 --Wimplicit-fallthrough=5 --Wrestrict diff --git a/config/gnu-warnings-8 b/config/gnu-warnings-8 deleted file mode 100644 index 5e7519d..0000000 --- a/config/gnu-warnings-8 +++ /dev/null @@ -1,3 +0,0 @@ --Wattribute-alias --Wcast-align=strict --Wshift-overflow=2 diff --git a/config/gnu-warnings-9 b/config/gnu-warnings-9 deleted file mode 100644 index c084350..0000000 --- a/config/gnu-warnings-9 +++ /dev/null @@ -1,2 +0,0 @@ --Wattribute-alias=2 --Wmissing-profile 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 deleted file mode 100644 index b0109e2..0000000 --- a/config/gnu-warnings-developer-4.8 +++ /dev/null @@ -1 +0,0 @@ --Wsuggest-attribute=format diff --git a/config/gnu-warnings-developer-7 b/config/gnu-warnings-developer-7 deleted file mode 100644 index 2a3ce7e..0000000 --- a/config/gnu-warnings-developer-7 +++ /dev/null @@ -1 +0,0 @@ --Wstringop-overflow=2 diff --git a/config/gnu-warnings-developer-8 b/config/gnu-warnings-developer-8 deleted file mode 100644 index a2ba7ca..0000000 --- a/config/gnu-warnings-developer-8 +++ /dev/null @@ -1,3 +0,0 @@ --Wstringop-overflow=4 --Wsuggest-attribute=cold --Wsuggest-attribute=malloc diff --git a/config/gnu-warnings-developer-general b/config/gnu-warnings-developer-general deleted file mode 100644 index b34c4b7..0000000 --- a/config/gnu-warnings-developer-general +++ /dev/null @@ -1,13 +0,0 @@ -# (suggestions from gcc, not code problems) -# NOTE: -Wformat-nonliteral added back in here (from being disabled in -# H5_CFLAGS) --Waggregate-return --Wdisabled-optimization --Wformat-nonliteral --Winline --Wmissing-format-attribute --Wmissing-noreturn --Wswitch-default --Wswitch-enum --Wunsafe-loop-optimizations --Wunused-macros diff --git a/config/gnu-warnings-general b/config/gnu-warnings-general deleted file mode 100644 index a7a20b7..0000000 --- a/config/gnu-warnings-general +++ /dev/null @@ -1,32 +0,0 @@ -# Note that some of the flags listed here really should be developer -# flags (listed in separate files, gnu-warnings-developer*) but we put -# them here because they are not raised by the current code and we'd like to -# know if they do start showing up. -# -# NOTE: Don't add -Wpadded here since we can't/won't fix the (many) -# warnings that are emitted. If you need it, add it from the -# environment variable at configure time. --Wall --Wcast-qual --Wconversion --Wextra --Wfloat-equal --Wformat=2 --Winit-self --Winvalid-pch --Wmissing-include-dirs -# -# NOTE: Due to the divergence in the C and C++, we're dropping support for -# compiling the C library with a C++ compiler and dropping the -Wc++-compat -# warning. -# --Wno-c++-compat -# -# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add -# it to the developer flags. -# --Wno-format-nonliteral --Wshadow --Wundef --Wwrite-strings --pedantic 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 deleted file mode 100644 index e42e09f..0000000 --- a/config/gnu-warnings-no-developer-4.8 +++ /dev/null @@ -1 +0,0 @@ --Wno-suggest-attribute=format diff --git a/config/gnu-warnings-no-developer-8 b/config/gnu-warnings-no-developer-8 deleted file mode 100644 index 2134bad..0000000 --- a/config/gnu-warnings-no-developer-8 +++ /dev/null @@ -1,2 +0,0 @@ --Wno-suggest-attribute=cold --Wno-suggest-attribute=malloc diff --git a/config/gnu-warnings-no-developer-general b/config/gnu-warnings-no-developer-general deleted file mode 100644 index 85dc0a3..0000000 --- a/config/gnu-warnings-no-developer-general +++ /dev/null @@ -1,4 +0,0 @@ --Wno-aggregate-return --Wno-inline --Wno-missing-format-attribute --Wno-missing-noreturn diff --git a/config/gnu-warnings/4.2-4.3 b/config/gnu-warnings/4.2-4.3 new file mode 100644 index 0000000..1881797 --- /dev/null +++ b/config/gnu-warnings/4.2-4.3 @@ -0,0 +1,3 @@ +# -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 new file mode 100644 index 0000000..ec4876f --- /dev/null +++ b/config/gnu-warnings/4.2-4.4 @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 0000000..37df4ab --- /dev/null +++ b/config/gnu-warnings/4.2-4.6 @@ -0,0 +1,2 @@ +# Disable warnings about using the 'long long' type w/ gcc 4.6 and earlier +-Wno-long-long diff --git a/config/gnu-warnings/4.2-4.last b/config/gnu-warnings/4.2-4.last new file mode 100644 index 0000000..2db90fb --- /dev/null +++ b/config/gnu-warnings/4.2-4.last @@ -0,0 +1,3 @@ +# -Wvla was later incorporated into -Wpedantic and +# only needs to be specified explicitly for gcc 4 +-Wvla diff --git a/config/gnu-warnings/4.3 b/config/gnu-warnings/4.3 new file mode 100644 index 0000000..13d8558 --- /dev/null +++ b/config/gnu-warnings/4.3 @@ -0,0 +1,2 @@ +-Wlarger-than=2560 +-Wlogical-op diff --git a/config/gnu-warnings/4.4 b/config/gnu-warnings/4.4 new file mode 100644 index 0000000..42929b5 --- /dev/null +++ b/config/gnu-warnings/4.4 @@ -0,0 +1,3 @@ +-Wframe-larger-than=16384 +-Wpacked-bitfield-compat +-Wsync-nand diff --git a/config/gnu-warnings/4.5 b/config/gnu-warnings/4.5 new file mode 100644 index 0000000..ddb96df --- /dev/null +++ b/config/gnu-warnings/4.5 @@ -0,0 +1 @@ +-Wstrict-overflow=5 diff --git a/config/gnu-warnings/4.5-4.6 b/config/gnu-warnings/4.5-4.6 new file mode 100644 index 0000000..d3035fe --- /dev/null +++ b/config/gnu-warnings/4.5-4.6 @@ -0,0 +1,3 @@ +# -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 new file mode 100644 index 0000000..140a20c --- /dev/null +++ b/config/gnu-warnings/4.6 @@ -0,0 +1,2 @@ +-Wdouble-promotion +-Wtrampolines diff --git a/config/gnu-warnings/4.7 b/config/gnu-warnings/4.7 new file mode 100644 index 0000000..c47fe4b --- /dev/null +++ b/config/gnu-warnings/4.7 @@ -0,0 +1,5 @@ +# +# -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 new file mode 100644 index 0000000..5dc577f --- /dev/null +++ b/config/gnu-warnings/4.8 @@ -0,0 +1 @@ +-Wmaybe-uninitialized diff --git a/config/gnu-warnings/4.9 b/config/gnu-warnings/4.9 new file mode 100644 index 0000000..78aa929 --- /dev/null +++ b/config/gnu-warnings/4.9 @@ -0,0 +1 @@ +-Wdate-time diff --git a/config/gnu-warnings/5 b/config/gnu-warnings/5 new file mode 100644 index 0000000..32cb196 --- /dev/null +++ b/config/gnu-warnings/5 @@ -0,0 +1,2 @@ +-Warray-bounds=2 +-Wc99-c11-compat diff --git a/config/gnu-warnings/6 b/config/gnu-warnings/6 new file mode 100644 index 0000000..736a446 --- /dev/null +++ b/config/gnu-warnings/6 @@ -0,0 +1,9 @@ +# +# Careful! -Wduplicated-cond, combined with HDF5's heavy use of +# macros, can make a lot of noise. +# +-Wduplicated-cond +-Whsa +-Wnormalized +-Wnull-dereference +-Wunused-const-variable diff --git a/config/gnu-warnings/7 b/config/gnu-warnings/7 new file mode 100644 index 0000000..266f5c1 --- /dev/null +++ b/config/gnu-warnings/7 @@ -0,0 +1,7 @@ +-Walloca +-Walloc-zero +-Wduplicated-branches +-Wformat-overflow=2 +-Wformat-truncation=1 +-Wimplicit-fallthrough=5 +-Wrestrict diff --git a/config/gnu-warnings/8 b/config/gnu-warnings/8 new file mode 100644 index 0000000..5e7519d --- /dev/null +++ b/config/gnu-warnings/8 @@ -0,0 +1,3 @@ +-Wattribute-alias +-Wcast-align=strict +-Wshift-overflow=2 diff --git a/config/gnu-warnings/9 b/config/gnu-warnings/9 new file mode 100644 index 0000000..c084350 --- /dev/null +++ b/config/gnu-warnings/9 @@ -0,0 +1,2 @@ +-Wattribute-alias=2 +-Wmissing-profile diff --git a/config/gnu-warnings/developer-4.5 b/config/gnu-warnings/developer-4.5 new file mode 100644 index 0000000..48df846 --- /dev/null +++ b/config/gnu-warnings/developer-4.5 @@ -0,0 +1,7 @@ +# +# -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 new file mode 100644 index 0000000..2372fbf --- /dev/null +++ b/config/gnu-warnings/developer-4.6 @@ -0,0 +1 @@ +-Wsuggest-attribute=const diff --git a/config/gnu-warnings/developer-4.7 b/config/gnu-warnings/developer-4.7 new file mode 100644 index 0000000..a3b0781 --- /dev/null +++ b/config/gnu-warnings/developer-4.7 @@ -0,0 +1,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 diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8 new file mode 100644 index 0000000..b0109e2 --- /dev/null +++ b/config/gnu-warnings/developer-4.8 @@ -0,0 +1 @@ +-Wsuggest-attribute=format diff --git a/config/gnu-warnings/developer-7 b/config/gnu-warnings/developer-7 new file mode 100644 index 0000000..2a3ce7e --- /dev/null +++ b/config/gnu-warnings/developer-7 @@ -0,0 +1 @@ +-Wstringop-overflow=2 diff --git a/config/gnu-warnings/developer-8 b/config/gnu-warnings/developer-8 new file mode 100644 index 0000000..a2ba7ca --- /dev/null +++ b/config/gnu-warnings/developer-8 @@ -0,0 +1,3 @@ +-Wstringop-overflow=4 +-Wsuggest-attribute=cold +-Wsuggest-attribute=malloc diff --git a/config/gnu-warnings/developer-general b/config/gnu-warnings/developer-general new file mode 100644 index 0000000..b34c4b7 --- /dev/null +++ b/config/gnu-warnings/developer-general @@ -0,0 +1,13 @@ +# (suggestions from gcc, not code problems) +# NOTE: -Wformat-nonliteral added back in here (from being disabled in +# H5_CFLAGS) +-Waggregate-return +-Wdisabled-optimization +-Wformat-nonliteral +-Winline +-Wmissing-format-attribute +-Wmissing-noreturn +-Wswitch-default +-Wswitch-enum +-Wunsafe-loop-optimizations +-Wunused-macros diff --git a/config/gnu-warnings/error-5 b/config/gnu-warnings/error-5 new file mode 100644 index 0000000..f7e1138 --- /dev/null +++ b/config/gnu-warnings/error-5 @@ -0,0 +1,12 @@ +-Werror=incompatible-pointer-types +# +# In GCC 4.4.7, the compiler gripes about shadowed global +# declarations when a local variable uses the name of a +# function that's in a system header file. For some reason, +# later versions of GCC (e.g., 5.2.0) don't complain about +# the shadowed globals. Maybe later versions are less fussy? +# Anyway, the shadowing seems to be harmless, and GCC 4.4.7 +# is not a supported compiler, so let us promote shadowed globals +# warnings to errors only for GCC 5 and later. +# +-Werror=shadow diff --git a/config/gnu-warnings/error-8 b/config/gnu-warnings/error-8 new file mode 100644 index 0000000..36c1414 --- /dev/null +++ b/config/gnu-warnings/error-8 @@ -0,0 +1,9 @@ +-Werror=cast-function-type +# +# For GCC 8, promote maybe-initialized warnings to an error. GCC 8 +# reports 0 maybe-uninitialized warnings where earlier versions +# make many false reports. GCC 8 seems to analyze calls to static +# in order to detect initializations that occur there. It's possible +# that GCC 8 only performs that analysis at -O3, though. +# +-Werror=maybe-uninitialized diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general new file mode 100644 index 0000000..d0e272a --- /dev/null +++ b/config/gnu-warnings/error-general @@ -0,0 +1,24 @@ +# +# HDF5 code should not trigger the following warnings under any +# circumstances, so ask the compiler to treat them as errors: +# +-Werror=bad-function-cast +-Werror=cast-align +-Werror=declaration-after-statement +-Werror=format +-Werror=implicit-function-declaration +-Werror=missing-declarations +-Werror=missing-prototypes +-Werror=nested-externs +-Werror=old-style-definition +-Werror=packed +-Werror=pointer-sign +-Werror=pointer-to-int-cast +-Werror=redundant-decls +-Werror=strict-prototypes +-Werror=switch +-Werror=unused-but-set-variable +-Werror=unused-function +-Werror=unused-parameter +-Werror=unused-variable +#-Werror=discarded-qualifiers diff --git a/config/gnu-warnings/general b/config/gnu-warnings/general new file mode 100644 index 0000000..a7a20b7 --- /dev/null +++ b/config/gnu-warnings/general @@ -0,0 +1,32 @@ +# Note that some of the flags listed here really should be developer +# flags (listed in separate files, gnu-warnings-developer*) but we put +# them here because they are not raised by the current code and we'd like to +# know if they do start showing up. +# +# NOTE: Don't add -Wpadded here since we can't/won't fix the (many) +# warnings that are emitted. If you need it, add it from the +# environment variable at configure time. +-Wall +-Wcast-qual +-Wconversion +-Wextra +-Wfloat-equal +-Wformat=2 +-Winit-self +-Winvalid-pch +-Wmissing-include-dirs +# +# NOTE: Due to the divergence in the C and C++, we're dropping support for +# compiling the C library with a C++ compiler and dropping the -Wc++-compat +# warning. +# +-Wno-c++-compat +# +# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add +# it to the developer flags. +# +-Wno-format-nonliteral +-Wshadow +-Wundef +-Wwrite-strings +-pedantic diff --git a/config/gnu-warnings/no-developer-4.5 b/config/gnu-warnings/no-developer-4.5 new file mode 100644 index 0000000..ef7d38f --- /dev/null +++ b/config/gnu-warnings/no-developer-4.5 @@ -0,0 +1 @@ +-Wno-unsuffixed-float-constants diff --git a/config/gnu-warnings/no-developer-4.6 b/config/gnu-warnings/no-developer-4.6 new file mode 100644 index 0000000..ea9cc66 --- /dev/null +++ b/config/gnu-warnings/no-developer-4.6 @@ -0,0 +1 @@ +-Wno-suggest-attribute=const diff --git a/config/gnu-warnings/no-developer-4.7 b/config/gnu-warnings/no-developer-4.7 new file mode 100644 index 0000000..5b85e1f --- /dev/null +++ b/config/gnu-warnings/no-developer-4.7 @@ -0,0 +1,2 @@ +-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 new file mode 100644 index 0000000..e42e09f --- /dev/null +++ b/config/gnu-warnings/no-developer-4.8 @@ -0,0 +1 @@ +-Wno-suggest-attribute=format diff --git a/config/gnu-warnings/no-developer-8 b/config/gnu-warnings/no-developer-8 new file mode 100644 index 0000000..2134bad --- /dev/null +++ b/config/gnu-warnings/no-developer-8 @@ -0,0 +1,2 @@ +-Wno-suggest-attribute=cold +-Wno-suggest-attribute=malloc diff --git a/config/gnu-warnings/no-developer-general b/config/gnu-warnings/no-developer-general new file mode 100644 index 0000000..85dc0a3 --- /dev/null +++ b/config/gnu-warnings/no-developer-general @@ -0,0 +1,4 @@ +-Wno-aggregate-return +-Wno-inline +-Wno-missing-format-attribute +-Wno-missing-noreturn diff --git a/config/gnu-werrors-5 b/config/gnu-werrors-5 deleted file mode 100644 index f7e1138..0000000 --- a/config/gnu-werrors-5 +++ /dev/null @@ -1,12 +0,0 @@ --Werror=incompatible-pointer-types -# -# In GCC 4.4.7, the compiler gripes about shadowed global -# declarations when a local variable uses the name of a -# function that's in a system header file. For some reason, -# later versions of GCC (e.g., 5.2.0) don't complain about -# the shadowed globals. Maybe later versions are less fussy? -# Anyway, the shadowing seems to be harmless, and GCC 4.4.7 -# is not a supported compiler, so let us promote shadowed globals -# warnings to errors only for GCC 5 and later. -# --Werror=shadow diff --git a/config/gnu-werrors-8 b/config/gnu-werrors-8 deleted file mode 100644 index 36c1414..0000000 --- a/config/gnu-werrors-8 +++ /dev/null @@ -1,9 +0,0 @@ --Werror=cast-function-type -# -# For GCC 8, promote maybe-initialized warnings to an error. GCC 8 -# reports 0 maybe-uninitialized warnings where earlier versions -# make many false reports. GCC 8 seems to analyze calls to static -# in order to detect initializations that occur there. It's possible -# that GCC 8 only performs that analysis at -O3, though. -# --Werror=maybe-uninitialized diff --git a/config/gnu-werrors-general b/config/gnu-werrors-general deleted file mode 100644 index d0e272a..0000000 --- a/config/gnu-werrors-general +++ /dev/null @@ -1,24 +0,0 @@ -# -# HDF5 code should not trigger the following warnings under any -# circumstances, so ask the compiler to treat them as errors: -# --Werror=bad-function-cast --Werror=cast-align --Werror=declaration-after-statement --Werror=format --Werror=implicit-function-declaration --Werror=missing-declarations --Werror=missing-prototypes --Werror=nested-externs --Werror=old-style-definition --Werror=packed --Werror=pointer-sign --Werror=pointer-to-int-cast --Werror=redundant-decls --Werror=strict-prototypes --Werror=switch --Werror=unused-but-set-variable --Werror=unused-function --Werror=unused-parameter --Werror=unused-variable -#-Werror=discarded-qualifiers -- cgit v0.12