From: wolf Date: Fri, 3 Jun 2005 16:32:42 +0000 (+0000) Subject: Use -ftrapv in debug mode to make sure we catch accidental signed integer overflows. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a3c99e4ec50bafd6160754b712133a4f66205a2;p=dealii-svn.git Use -ftrapv in debug mode to make sure we catch accidental signed integer overflows. git-svn-id: https://svn.dealii.org/trunk@10837 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 72583446ba..d887545326 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -330,7 +330,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl First the flags for gcc compilers if test "$GXX" = yes ; then CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -ftemplate-depth-128" - CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Winline -Woverloaded-virtual -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-128" + CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Winline -Woverloaded-virtual -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-128 -ftrapv" dnl BOOST uses long long, so don't warn about this CXXFLAGSG="$CXXFLAGSG -Wno-long-long" diff --git a/deal.II/configure b/deal.II/configure index 9b2cf634dd..8200c93166 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -3104,7 +3104,7 @@ echo "${ECHO_T}Unrecognized C++ compiler -- Try to go ahead and get help from de if test "$GXX" = yes ; then CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -ftemplate-depth-128" - CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Winline -Woverloaded-virtual -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-128" + CXXFLAGSG="$CXXFLAGS -DDEBUG -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Winline -Woverloaded-virtual -Wsynth -Wsign-compare -Wconversion -Wswitch -ftemplate-depth-128 -ftrapv" CXXFLAGSG="$CXXFLAGSG -Wno-long-long" @@ -3986,7 +3986,6 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - CFLAGS="$CFLAGS -wd1572" else echo "$as_me: failed program was:" >&5 @@ -3995,7 +3994,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - CFLAGS="$OLDCFLAGS" + + CFLAGS="$OLDCFLAGS" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext