]> granicus.if.org Git - python/commitdiff
[3.8] bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14473)
authorBenjamin Peterson <benjamin@python.org>
Sat, 29 Jun 2019 23:51:59 +0000 (16:51 -0700)
committerGitHub <noreply@github.com>
Sat, 29 Jun 2019 23:51:59 +0000 (16:51 -0700)
(cherry picked from commit 95da310078a9364bae9ab3f2ad9c71e34306a70c)

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

index 598f5819f8f34ec759cf0be1b790b9c21986f8ad..edc3434242971a9d8c855e24e359dd97d6b9d290 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1599,9 +1599,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')
 
         self.add(Extension('pyexpat',
                            define_macros=define_macros,