bpo-37437: Pass -Wno-unreachable-code when compiling expat. (GH-14470)

This commit is contained in:
Benjamin Peterson 2019-06-29 16:00:22 -07:00 committed by GitHub
parent 3e6583061c
commit 95da310078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1608,9 +1608,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,