summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-06-20 20:28:50 -0700
committerGitHub <noreply@github.com>2018-06-20 20:28:50 -0700
commit5f997ea7363bd29ae53b57051ebac8d1da8f9439 (patch)
treeddcae46a71db87da31ca6d83e3dd3ee9098ace22 /configure.ac
parentdd0bd217e222b2db5fac9aedee3aacee8a28d0b1 (diff)
Fix warnings and enable -Wnon-virtual-dtor warning (#2079)
This commit fixes warnings for an unused variable, comparison of two different types and add virtual destructors to classes that were previously missing them. It also enables the -Wnon-virtual-dtor warning which warns about any class definition with virtual methods that does not have a virtual destructor (except if the destructor is protected). This flag is supported by both clang and GCC and not enabled by default.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 81e3f1fdc..48ef9c7f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -988,6 +988,7 @@ CVC4_CXX_OPTION([-Wno-parentheses], [WNO_PARENTHESES])
CVC4_CXX_OPTION([-Wno-uninitialized], [WNO_UNINITIALIZED])
CVC4_CXX_OPTION([-Wno-unused-variable], [WNO_UNUSED_VARIABLE])
CVC4_CXX_OPTION([-Wsuggest-override], [W_SUGGEST_OVERRIDE])
+CVC4_CXX_OPTION([-Wnon-virtual-dtor], [W_NON_VIRTUAL_DTOR])
CVC4_CXX_OPTION([-fno-strict-aliasing], [FNO_STRICT_ALIASING])
AC_SUBST([WERROR])
AC_SUBST([WNO_CONVERSION_NULL])
@@ -996,9 +997,11 @@ AC_SUBST([WNO_PARENTHESES])
AC_SUBST([WNO_UNINITIALIZED])
AC_SUBST([WNO_UNUSED_VARIABLE])
AC_SUBST([W_SUGGEST_OVERRIDE])
+AC_SUBST([W_NON_VIRTUAL_DTOR])
AC_SUBST([FNO_STRICT_ALIASING])
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }${W_SUGGEST_OVERRIDE}"
+CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }${W_NON_VIRTUAL_DTOR}"
# On Mac, we have to fix the visibility of standard library symbols.
# Otherwise, exported template instantiations---even though explicitly
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback