Hi, I remember discussing this before and coming to conclusion that -fno-strict-aliasing would be removed from py3k CFLAGS. But as of now its still used.
I tested with gcc 4.3.1 on Linux x86_64 and there is no strict aliasing warning when this flag is removed. Also make testall passes. Is there any reason to keep this flag? If not see the attached patch. Regards, ismail -- Programmer Excuses number 45: I do object-oriented programming - if the customer objects, I do more programming.
Index: configure.in =================================================================== --- configure.in (revision 64653) +++ configure.in (working copy) @@ -785,23 +785,6 @@ # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - # Python violates C99 rules, by casting between incompatible - # pointer types. GCC may generate bad code as a result of that, - # so use -fno-strict-aliasing if supported. - AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) - ac_save_cc="$CC" - CC="$CC -fno-strict-aliasing" - AC_TRY_RUN([int main() { return 0; }], - ac_cv_no_strict_aliasing_ok=yes, - ac_cv_no_strict_aliasing_ok=no, - ac_cv_no_strict_aliasing_ok=no) - CC="$ac_save_cc" - AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) - if test $ac_cv_no_strict_aliasing_ok = yes - then - BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" - fi - # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow # the standard.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com