summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-12-21 18:57:18 (GMT)
committerGitHub <noreply@github.com>2020-12-21 18:57:18 (GMT)
commit71440cef1c4cf4757fe53906b663b286fc537ede (patch)
treeb98646c4ab38431bccb5240535e3fafe921917bb /config
parent0483817a9250d90afc685864db640367558a1e3d (diff)
downloadhdf5-71440cef1c4cf4757fe53906b663b286fc537ede.zip
hdf5-71440cef1c4cf4757fe53906b663b286fc537ede.tar.gz
hdf5-71440cef1c4cf4757fe53906b663b286fc537ede.tar.bz2
Add compiler flags for GCC 10, along with updating warnhist script to accommodate them. (#217)
Diffstat (limited to 'config')
-rw-r--r--config/gnu-cxxflags8
-rw-r--r--config/gnu-flags10
-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/developer-106
6 files changed, 48 insertions, 4 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index eb490b3..0b48bdf 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -186,9 +186,9 @@ if test "X-g++" = "X-$cxx_vendor"; then
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)"
H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments cxx-noerror-general)"
- ######################
- # Developer warnings #
- ######################
+ ######################
+ # Developer warnings #
+ ######################
NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
@@ -210,7 +210,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
# 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)"
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)"
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)"
fi
diff --git a/config/gnu-flags b/config/gnu-flags
index f9b9ceb..538fd53 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -264,6 +264,16 @@ if test "X-gcc" = "X-$cc_vendor"; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9)"
fi
+ # gcc >= 9.3
+ if test $cc_vers_major -ge 10 -o $cc_vers_major -eq 9 -a $cc_vers_minor -ge 3; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9.3)"
+ fi
+
+ # gcc >= 10
+ if test $cc_vers_major -ge 10; then
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)"
+ fi
+
#################
# Flags are set #
#################
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/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