]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470) (GH-14472)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 30 Jun 2019 00:36:29 +0000 (17:36 -0700)
committerNed Deily <nad@python.org>
Sun, 30 Jun 2019 00:36:29 +0000 (20:36 -0400)
(cherry picked from commit 95da310078a9364bae9ab3f2ad9c71e34306a70c)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
setup.py

index fb95fb5298f36ed527b0fd67cd87ffd713011d1e..e2c18982532b8448b200f80dd6322795e24ecb3e 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1557,9 +1557,9 @@ class PyBuildExt(build_ext):
 
             cc = sysconfig.get_config_var('CC').split()[0]
             ret = os.system(
-                      '"%s" -Werror -Wimplicit-fallthrough -E -xc /dev/null >/dev/null 2>&1' % cc)
+                      '"%s" -Werror -Wno-unreachable-code -E -xc /dev/null >/dev/null 2>&1' % cc)
             if ret >> 8 == 0:
-                extra_compile_args.append('-Wno-implicit-fallthrough')
+                extra_compile_args.append('-Wno-unreachable-code')
 
         exts.append(Extension('pyexpat',
                               define_macros = define_macros,