summaryrefslogtreecommitdiffstats
path: root/config/gnu-flags
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-11-22 19:49:59 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-11-22 19:49:59 (GMT)
commitdde718ad51fdedd5318335ba6f7917f046d5ea77 (patch)
treeb337fb909ccd63724c101944f63c36726b33d0a3 /config/gnu-flags
parentedb6f344401209ebf90b3c085537d6934d346d66 (diff)
downloadhdf5-dde718ad51fdedd5318335ba6f7917f046d5ea77.zip
hdf5-dde718ad51fdedd5318335ba6f7917f046d5ea77.tar.gz
hdf5-dde718ad51fdedd5318335ba6f7917f046d5ea77.tar.bz2
Only use -Werror=cast-function-type with GCC 8 and later.
Diffstat (limited to 'config/gnu-flags')
-rw-r--r--config/gnu-flags2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 2547b67..c71974b 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -196,7 +196,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
# HDF5 code should not trigger the following warnings under any
# circumstances, so ask the compiler to treat them as errors:
#
- H5_ECFLAGS="$H5_ECFLAGS -Werror=cast-function-type"
# H5_ECFLAGS="$H5_ECFLAGS -Werror=discarded-qualifiers"
H5_ECFLAGS="$H5_ECFLAGS -Werror=implicit-function-declaration"
H5_ECFLAGS="$H5_ECFLAGS -Werror=incompatible-pointer-types"
@@ -348,6 +347,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc 8
if test $cc_vers_major -ge 8; then
+ H5_ECFLAGS="$H5_ECFLAGS -Werror=cast-function-type"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS -Wstringop-overflow=4 -Wsuggest-attribute=cold -Wsuggest-attribute=malloc"
NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS -Wno-suggest-attribute=cold -Wno-suggest-attribute=malloc"
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2"