Christian Heimes added the comment:

Socket and SSL are using bluetooth.h which defines some functionas as
inline. Inline isn't part of C89. Linuxaudiodev depends on the 'linux'
macro which is not defined in  C89.

The Python core can be compiled with -ansi but the extension modules
require -std=gnu89.

Added file: http://bugs.python.org/file8950/config.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1621>
__________________________________
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
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to