Mercurial > hg > octave-nkf
changeset 11513:a2289858dcb2
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:49:46 -0500 |
parents | e4e82740e9cd |
children | a1386fab2a02 |
files | ChangeLog configure.ac |
diffstat | 2 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-13 John W. Eaton <jwe@octave.org> + + * configure.ac (AC_ARG_ENABLE(extra-warning-flags)): Check for + -Wcast-qual and -Wcast-align and add them to WARN_CFLAGS and + WARN_CXXFLAGS. + 2011-01-13 John W. Eaton <jwe@octave.org> * configure.ac (AC_ARG_ENABLE(extra-warning-flags)): Check for
--- a/configure.ac +++ b/configure.ac @@ -1863,6 +1863,12 @@ OCTAVE_CC_FLAG(-Wwrite-strings, [ WARN_CFLAGS="$WARN_CFLAGS -Wwrite-strings"; AC_MSG_RESULT([adding -Wwrite-strings to WARN_CFLAGS])]) + OCTAVE_CC_FLAG(-Wcast-align, [ + WARN_CFLAGS="$WARN_CFLAGS -Wcast-align"; + AC_MSG_RESULT([adding -Wcast-align to WARN_CFLAGS])]) + OCTAVE_CC_FLAG(-Wcast-qual, [ + WARN_CFLAGS="$WARN_CFLAGS -Wcast-qual"; + AC_MSG_RESULT([adding -Wcast-qual to WARN_CFLAGS])]) OCTAVE_CXX_FLAG(-Wall, [ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"; @@ -1885,11 +1891,17 @@ OCTAVE_CXX_FLAG(-Wwrite-strings, [ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wwrite-strings"; AC_MSG_RESULT([adding -Wwrite-strings to WARN_CXXFLAGS])]) + OCTAVE_CXX_FLAG(-Wcast-align, [ + WARN_CXXFLAGS="$WARN_CXXFLAGS -Wcast-align"; + AC_MSG_RESULT([adding -Wcast-align to WARN_CXXFLAGS])]) + OCTAVE_CXX_FLAG(-Wcast-qual, [ + WARN_CXXFLAGS="$WARN_CXXFLAGS -Wcast-qual"; + AC_MSG_RESULT([adding -Wcast-qual to WARN_CXXFLAGS])]) fi -GCC_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion" +GCC_STRICT_FLAGS="-Wconversion" -GXX_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Weffc++" +GXX_STRICT_FLAGS="-Wconversion -Weffc++" try_strict_warning_flags=false