summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2016-03-08 05:40:12 (GMT)
committerNed Deily <nad@python.org>2016-03-08 05:40:12 (GMT)
commit686905fe13fdd00bb02d9343e7574e38763b3711 (patch)
tree5b962e71dbbd7e9df23600ce0d55e88539e95a3a /configure
parent8cd8883d27c59ad70366a59490f5ef6186d11522 (diff)
parentbec699e40d7e68d4039d2c1a352dcdb1661e77ef (diff)
downloadcpython-686905fe13fdd00bb02d9343e7574e38763b3711.zip
cpython-686905fe13fdd00bb02d9343e7574e38763b3711.tar.gz
cpython-686905fe13fdd00bb02d9343e7574e38763b3711.tar.bz2
Issue #24324: merge from 3.5
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure b/configure
index bd33d14..970f909 100755
--- a/configure
+++ b/configure
@@ -6963,15 +6963,24 @@ fi
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
- { $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"
+ # 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; }
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow