diff configure.ac @ 11511:8837a42205d3

more warning flags for GCC if configured with --enable-extra-warning-flags (on by default)
author John W. Eaton <jwe@octave.org>
date Thu, 13 Jan 2011 07:21:46 -0500
parents f46aeb3ea6b7
children a2289858dcb2
line wrap: on
line diff
--- a/configure.ac	Thu Jan 13 06:31:32 2011 -0500
+++ b/configure.ac	Thu Jan 13 07:21:46 2011 -0500
@@ -1851,6 +1851,18 @@
   OCTAVE_CC_FLAG(-Wformat, [
     WARN_CFLAGS="$WARN_CFLAGS -Wformat";
     AC_MSG_RESULT([adding -Wformat to WARN_CFLAGS])])
+  OCTAVE_CC_FLAG(-Wpointer-arith, [
+    WARN_CFLAGS="$WARN_CFLAGS -Wpointer-arith";
+    AC_MSG_RESULT([adding -Wpointer-arith to WARN_CFLAGS])])
+  OCTAVE_CC_FLAG(-Wmissing-prototypes, [
+    WARN_CFLAGS="$WARN_CFLAGS -Wmissing-prototypes";
+    AC_MSG_RESULT([adding -Wmissing-prototypes to WARN_CFLAGS])])
+  OCTAVE_CC_FLAG(-Wstrict-prototypes, [
+    WARN_CFLAGS="$WARN_CFLAGS -Wstrict-prototypes";
+    AC_MSG_RESULT([adding -Wstrict-prototypes to WARN_CFLAGS])])
+  OCTAVE_CC_FLAG(-Wwrite-strings, [
+    WARN_CFLAGS="$WARN_CFLAGS -Wwrite-strings";
+    AC_MSG_RESULT([adding -Wwrite-strings to WARN_CFLAGS])])
 
   OCTAVE_CXX_FLAG(-Wall, [
     WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall";
@@ -1867,13 +1879,17 @@
   OCTAVE_CXX_FLAG(-Wformat, [
     WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat";
     AC_MSG_RESULT([adding -Wformat to WARN_CXXFLAGS])])
+  OCTAVE_CXX_FLAG(-Wpointer-arith, [
+    WARN_CXXFLAGS="$WARN_CXXFLAGS -Wpointer-arith";
+    AC_MSG_RESULT([adding -Wpointer-arith to WARN_CXXFLAGS])])
+  OCTAVE_CXX_FLAG(-Wwrite-strings, [
+    WARN_CXXFLAGS="$WARN_CXXFLAGS -Wwrite-strings";
+    AC_MSG_RESULT([adding -Wwrite-strings to WARN_CXXFLAGS])])
 fi
 
-GCC_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Wmissing-prototypes \
-  -Wpointer-arith -Wstrict-prototypes -Wwrite-strings"
+GCC_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion"
 
-GXX_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Wpointer-arith \
-  -Wwrite-strings -Weffc++"
+GXX_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Weffc++"
 
 try_strict_warning_flags=false