Index: configure.in =================================================================== --- configure.in (revision 60053) +++ configure.in (working copy) @@ -758,9 +758,9 @@ if test "$CC" != 'g++' ; then STRICT_PROTO="-Wstrict-prototypes" fi - # For gcc 4.x we need to use -fwrapv so lets check if its supported - if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then - WRAP="-fwrapv" + # For gcc 4.2+ we need to use -Wstrict-overflow so lets check if its supported + if "$CC" -v --help 2>/dev/null |grep -- -Wstrict-overflow > /dev/null; then + OVERFLOW_CHECK="-Wstrict-overflow=3 -Werror=strict-overflow" fi case $ac_cv_prog_cc_g in yes) @@ -769,7 +769,7 @@ # debug builds. OPT="-g -Wall $STRICT_PROTO" else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + OPT="-g -O3 -Wall $OVERFLOW_CHECK $STRICT_PROTO" fi ;; *)