summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-05-25 13:16:51 +0300
committerGitHub <noreply@github.com>2018-05-25 13:16:51 +0300
commitef91ddeae79497fac25545dd68ee55a5a3c60e8d (patch)
tree0dc17d8800827ea6da651a993bb8204b1d462d37 /configure
parent82d727fce68577d9f44f9ecfaf20bd4581a66404 (diff)
downloadcpython-git-ef91ddeae79497fac25545dd68ee55a5a3c60e8d.tar.gz
bpo-33012: Add -Wno-cast-function-type for gcc 8. (GH-6757)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure41
1 files changed, 41 insertions, 0 deletions
diff --git a/configure b/configure
index b1cd944ac5..b398ef8b0d 100755
--- a/configure
+++ b/configure
@@ -7052,6 +7052,47 @@ $as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
+$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
+ ac_save_cc="$CC"
+ CC="$CC -Wcast-function-type -Werror"
+ if ${ac_cv_disable_cast_function_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ac_cv_disable_cast_function_type=yes
+
+else
+
+ ac_cv_disable_cast_function_type=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ CC="$ac_save_cc"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
+$as_echo "$ac_cv_disable_cast_function_type" >&6; }
+
+ if test $ac_cv_disable_cast_function_type = yes
+ then
+ CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
ac_save_cc="$CC"