From: Christophe CURIS <[email protected]>

We probably don't want our users to have to endure them, so they
are enabled only when Debug is activated, because they tend to
help keeping the code safe.
---
 configure.ac |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/configure.ac b/configure.ac
index 1419080..32ea0d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,22 @@ AS_IF([test "x$debug" = "xyes"],
 
 AX_CFLAGS_GCC_OPTION(-Wall)
 AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare -Wno-unused-parameter)
+AS_IF([test "x$debug" = "xyes"],
+    [dnl When debug is enabled, we try to activate more checks from
+     dnl the compiler. They are on independant check because the
+     dnl macro checks all the options at once, but we may have cases
+     dnl where some options are not supported and we don't want to
+     dnl loose all of them.
+     dnl
+     dnl Floating-point comparison is not a good idea
+     AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
+     dnl
+     dnl Try to report misuses of '&' versus '&&' and similar
+     AX_CFLAGS_GCC_OPTION([-Wlogical-op])
+     dnl
+     dnl Use of 'sizeof()' on inappropriate pointer types
+     AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
+])
 
 dnl Platform-specific Makefile setup
 dnl ================================
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to