summaryrefslogtreecommitdiffstats
path: root/config/gnu-warnings
diff options
context:
space:
mode:
Diffstat (limited to 'config/gnu-warnings')
-rw-r--r--config/gnu-warnings/4.81
-rw-r--r--config/gnu-warnings/9.31
-rw-r--r--config/gnu-warnings/cxx-4.826
-rw-r--r--config/gnu-warnings/cxx-noerror-511
-rw-r--r--config/gnu-warnings/cxx-noerror-general32
-rw-r--r--config/gnu-warnings/developer-106
-rw-r--r--config/gnu-warnings/noerror-512
-rw-r--r--config/gnu-warnings/noerror-825
-rw-r--r--config/gnu-warnings/noerror-general91
9 files changed, 205 insertions, 0 deletions
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8
index 05f4d92..fa678ff 100644
--- a/config/gnu-warnings/4.8
+++ b/config/gnu-warnings/4.8
@@ -9,6 +9,7 @@
# warning flag added for GCC >= 4.5
-Wstrict-overflow=5
+
# This warning can only be truly addressed using the gcc extension of
# using D to indicate doubles (e.g., 1.23D).
-Wno-unsuffixed-float-constants
diff --git a/config/gnu-warnings/9.3 b/config/gnu-warnings/9.3
new file mode 100644
index 0000000..f37fdd6
--- /dev/null
+++ b/config/gnu-warnings/9.3
@@ -0,0 +1 @@
+-Wc11-c2x-compat
diff --git a/config/gnu-warnings/cxx-4.8 b/config/gnu-warnings/cxx-4.8
new file mode 100644
index 0000000..744ebdc
--- /dev/null
+++ b/config/gnu-warnings/cxx-4.8
@@ -0,0 +1,26 @@
+# 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/cxx-noerror-5 b/config/gnu-warnings/cxx-noerror-5
new file mode 100644
index 0000000..7bce3e8
--- /dev/null
+++ b/config/gnu-warnings/cxx-noerror-5
@@ -0,0 +1,11 @@
+#
+# 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.
+#
+-Wshadow
diff --git a/config/gnu-warnings/cxx-noerror-general b/config/gnu-warnings/cxx-noerror-general
new file mode 100644
index 0000000..8cc1d94
--- /dev/null
+++ b/config/gnu-warnings/cxx-noerror-general
@@ -0,0 +1,32 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tcompound.cpp
+# -Werror=cast-align
+-Wcast-align
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp
+# -Werror=missing-declarations
+-Wmissing-declarations
+-Wpacked
+-Wredundant-decls
+-Wswitch
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tattr.cpp
+# -Werror=unused-but-set-variable
+-Wunused-but-set-variable
+-Wunused-function
+-Wunused-variable
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp
+# -Werror=unused-parameter
+-Wunused-parameter
+#
+# Other files not compatible
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/titerate.cpp,c++/test/tarray.cpp
+# -Werror=missing-declarations
+# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp
+# -Werror=unused-parameter
diff --git a/config/gnu-warnings/developer-10 b/config/gnu-warnings/developer-10
new file mode 100644
index 0000000..fcd460d
--- /dev/null
+++ b/config/gnu-warnings/developer-10
@@ -0,0 +1,6 @@
+# New warning
+-Warith-conversion
+
+# Enable static analysis of program flow
+-fanalyzer
+-fdiagnostics-path-format=none
diff --git a/config/gnu-warnings/noerror-5 b/config/gnu-warnings/noerror-5
new file mode 100644
index 0000000..a7d40dd
--- /dev/null
+++ b/config/gnu-warnings/noerror-5
@@ -0,0 +1,12 @@
+-Wincompatible-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.
+#
+-Wshadow
diff --git a/config/gnu-warnings/noerror-8 b/config/gnu-warnings/noerror-8
new file mode 100644
index 0000000..2f54a4d
--- /dev/null
+++ b/config/gnu-warnings/noerror-8
@@ -0,0 +1,25 @@
+# NOTE: src/ files are not compatible with these warnings as errors
+# src/H5Dchunk.c
+# -Werror=cast-function-type
+-Wcast-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.
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDlog.c,
+# -Werror=maybe-uninitialized
+-Wmaybe-uninitialized
+# NOTE: src/ files are not compatible with these warnings as errors
+# src/H5Shyper.c,src/H5SL.c,src/H5Shyper.c
+# -Werror=maybe-uninitialized
+# NOTE: Test files are not compatible with these warnings as errors
+# test/cache_common.c,
+# -Werror=maybe-uninitialized
+# NOTE: hl/src/ files are not compatible with these warnings as errors
+# hl/src/H5DS.c,
+# -Werror=maybe-uninitialized
diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general
new file mode 100644
index 0000000..e19014f
--- /dev/null
+++ b/config/gnu-warnings/noerror-general
@@ -0,0 +1,91 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+-Wbad-function-cast
+-Wdeclaration-after-statement
+-Wimplicit-function-declaration
+-Wmissing-declarations
+-Wmissing-prototypes
+-Wnested-externs
+-Wold-style-definition
+-Wpacked
+-Wpointer-sign
+-Wpointer-to-int-cast
+-Wredundant-decls
+-Wstrict-prototypes
+-Wswitch
+#
+#-Werror=discarded-qualifiers
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
+# -Werror=unused-function
+#
+-Wunused-function
+#
+# H5FDdrvr_module.h
+# -Werror=unused-variable
+#
+-Wunused-variable
+#
+# H5VLpassthru.c
+# -Werror=unused-parameter
+#
+-Wunused-parameter
+#
+#
+#
+# NOTE: Tools files are not compatible with these warnings as errors
+# lib/h5tools.c
+# -Werror=cast-align
+#
+-Wcast-align
+#
+# lib/h5diff_array.c
+# -Werror=unused-but-set-variable
+#
+-Wunused-but-set-variable
+#
+# lib/h5tools_utils.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: JNI files are not compatible with these warnings as errors
+# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
+# jni/h5sImp.c,jni/h5tImp.c
+# -Werror=cast-align
+# jni/h5util.c
+# -Werror=format(-overflow)
+#
+-Wformat
+#
+#
+#Examples and tests do not use the same set of extensive warning flags as libraries
+# Here is a list of tests and examples that have issues with the stricter warnings as error
+#
+# NOTE: Test files are not compatible with these warnings as errors
+# thread_id.c,
+# -Werror=unused-function
+# dsets.c
+# -Werror=unused-parameter
+# external.c,perform/sio_engine.c
+# -Werror=format(-truncation)
+#
+#
+# NOTE: Examples files are not compatible with these warnings as errors
+# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
+# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
+# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
+# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
+# h5_reference_deprec.c
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=strict-prototypes
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=old-style-definition
+# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
+# -Werror=unused-variable
+# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
+# -Werror=unused-parameter
+