[Python-checkins] cpython (merge 3.5 -> default): Issue #24324: merge from 3.5
ned.deily
python-checkins at python.org
Tue Mar 8 00:52:40 EST 2016
https://hg.python.org/cpython/rev/8fecf6e17616
changeset: 100448:8fecf6e17616
parent: 100445:0d77a17567a4
parent: 100447:61f8f7610a88
user: Ned Deily <nad at python.org>
date: Tue Mar 08 00:40:12 2016 -0500
summary:
Issue #24324: merge from 3.5
files:
Misc/NEWS | 4 ++++
aclocal.m4 | 4 ++--
configure | 23 ++++++++++++++++-------
configure.ac | 13 +++++++++++--
4 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -811,6 +811,10 @@
- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
+- Issue #24324: Do not enable unreachable code warnings when using
+ gcc as the option does not work correctly in older versions of gcc
+ and has been silently removed as of gcc-4.5.
+
Windows
-------
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6963,16 +6963,25 @@
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
+
+ # Don't enable unreachable code warning in debug mode, since it usually
+ # results in non-standard code paths.
+ # Issue #24324: Unfortunately, the unreachable code warning does not work
+ # correctly on gcc and has been silently removed from the compiler.
+ # It is supported on clang but on OS X systems gcc may be an alias
+ # for clang. Try to determine if the compiler is not really gcc and,
+ # if so, only then enable the warning.
+ if test $ac_cv_enable_unreachable_code_warning = yes && \
+ test "$Py_DEBUG" != "true" && \
+ test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
+ then
+ BASECFLAGS="$BASECFLAGS -Wunreachable-code"
+ else
+ ac_cv_enable_unreachable_code_warning=no
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
- # Don't enable unreachable code warning in debug mode, since it usually
- # results in non-standard code paths.
- if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
- then
- BASECFLAGS="$BASECFLAGS -Wunreachable-code"
- 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.
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1483,14 +1483,23 @@
]))
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
- AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning)
# Don't enable unreachable code warning in debug mode, since it usually
# results in non-standard code paths.
- if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
+ # Issue #24324: Unfortunately, the unreachable code warning does not work
+ # correctly on gcc and has been silently removed from the compiler.
+ # It is supported on clang but on OS X systems gcc may be an alias
+ # for clang. Try to determine if the compiler is not really gcc and,
+ # if so, only then enable the warning.
+ if test $ac_cv_enable_unreachable_code_warning = yes && \
+ test "$Py_DEBUG" != "true" && \
+ test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
then
BASECFLAGS="$BASECFLAGS -Wunreachable-code"
+ else
+ ac_cv_enable_unreachable_code_warning=no
fi
+ AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning)
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list