Index: configure =================================================================== --- configure (Revision 59488) +++ configure (Arbeitskopie) @@ -4427,25 +4427,29 @@ then case $GCC in yes) - if test "$CC" != 'g++' ; then + 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" - 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" + fi + # For gcc 4.x we use -Wstrict-overflow for extra warnings + if "$CC" -v --help 2>/dev/null |grep -- -Wstrict-overflow > /dev/null; then + STRICT_OVERFLOW="-Wstrict-overflow" + fi case $ac_cv_prog_cc_g in yes) if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. - OPT="-g -Wall $STRICT_PROTO" + OPT="-std=gnu89 -g -Wall -Werror $STRICT_PROTO $STRICT_OVERFLOW" else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + OPT="-std=gnu89 -g $WRAP -O3 -Wall -Werror $STRICT_PROTO $STRICT_OVERFLOW" fi ;; *) - OPT="-O3 -Wall $STRICT_PROTO" + OPT="-O3 -Wall -Werror $STRICT_PROTO" ;; esac case $ac_sys_system in Index: configure.in =================================================================== --- configure.in (Revision 59488) +++ configure.in (Arbeitskopie) @@ -754,25 +754,29 @@ then case $GCC in yes) - if test "$CC" != 'g++' ; then + 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" - 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" + fi + # For gcc 4.x we use -Wstrict-overflow for extra warnings + if "$CC" -v --help 2>/dev/null |grep -- -Wstrict-overflow > /dev/null; then + STRICT_OVERFLOW="-Wstrict-overflow" + fi case $ac_cv_prog_cc_g in yes) if test "$Py_DEBUG" = 'true' ; then # Optimization messes up debuggers, so turn it off for # debug builds. - OPT="-g -Wall $STRICT_PROTO" + OPT="-std=gnu89 -g -Wall -Werror $STRICT_PROTO $STRICT_OVERFLOW" else - OPT="-g $WRAP -O3 -Wall $STRICT_PROTO" + OPT="-std=gnu89 -g $WRAP -O3 -Wall -Werror $STRICT_PROTO $STRICT_OVERFLOW" fi ;; *) - OPT="-O3 -Wall $STRICT_PROTO" + OPT="-O3 -Wall -Werror $STRICT_PROTO" ;; esac case $ac_sys_system in