summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-12-05 00:08:57 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-12-05 00:08:57 (GMT)
commitc7b3d6d6a5c1d376812e17c0ddb26f55334a2c59 (patch)
tree5505acff8b58df08aa624c708e4ef29c1574948f /config
parentaa0b54e27e5d6f0b7c23fe5662d5c8f30898d7f4 (diff)
parent1ad02a445920578654d257bb66aa1e8e7e368018 (diff)
downloadhdf5-c7b3d6d6a5c1d376812e17c0ddb26f55334a2c59.zip
hdf5-c7b3d6d6a5c1d376812e17c0ddb26f55334a2c59.tar.gz
hdf5-c7b3d6d6a5c1d376812e17c0ddb26f55334a2c59.tar.bz2
Merge pull request #2072 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:cpp_warning_disable to develop
* commit '1ad02a445920578654d257bb66aa1e8e7e368018': Yanked -Wc++-compat from the flags used to build the C library in both the Autotools and CMake.
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake2
-rw-r--r--config/gnu-flags5
2 files changed, 5 insertions, 2 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index adace89..f49b674 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -107,7 +107,7 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
endif()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra")
- set (H5_CFLAGS0 "${H5_CFLAGS0} -Wbad-function-cast -Wc++-compat -Wcast-align")
+ set (H5_CFLAGS0 "${H5_CFLAGS0} -Wbad-function-cast -Wno-c++-compat -Wcast-align")
set (H5_CFLAGS0 "${H5_CFLAGS0} -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal")
set (H5_CFLAGS0 "${H5_CFLAGS0} -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs")
set (H5_CFLAGS0 "${H5_CFLAGS0} -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith")
diff --git a/config/gnu-flags b/config/gnu-flags
index 6355ccf..16795d0 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -168,7 +168,10 @@ if test "X-gcc" = "X-$cc_vendor"; then
# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
# it to the developer flags.
#
- H5_CFLAGS="$H5_CFLAGS -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align"
+ # 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.
+ H5_CFLAGS="$H5_CFLAGS -pedantic -Wall -Wextra -Wbad-function-cast -Wno-c++-compat -Wcast-align"
H5_CFLAGS="$H5_CFLAGS -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal"
H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs"
H5_CFLAGS="$H5_CFLAGS -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked"