summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-01-05 12:45:04 -0700
committerGitHub <noreply@github.com>2020-01-05 12:45:04 -0700
commit5184eb3deeb5509f29d4d0d59036b1d73295baeb (patch)
tree81788c5876e4b10b621963b3ce22251e1f460d63 /numpy
parentc31cc36a8a814ed4844a2a553454185601914a5a (diff)
parentc2f930017ab05b32a503e622cee671add7abb78e (diff)
downloadnumpy-5184eb3deeb5509f29d4d0d59036b1d73295baeb.tar.gz
Merge pull request #15238 from mattip/redo-c99
MAINT: only add --std=c99 where needed
Diffstat (limited to 'numpy')
-rw-r--r--numpy/distutils/ccompiler.py5
-rw-r--r--numpy/distutils/tests/test_ccompiler.py22
2 files changed, 0 insertions, 27 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
index ef29189f7..04d85e365 100644
--- a/numpy/distutils/ccompiler.py
+++ b/numpy/distutils/ccompiler.py
@@ -530,11 +530,6 @@ def CCompiler_customize(self, dist, need_cxx=0):
'g++' in self.compiler[0] or
'clang' in self.compiler[0]):
self._auto_depends = True
- if 'gcc' in self.compiler[0] and not need_cxx:
- # add std=c99 flag for gcc
- # TODO: does this need to be more specific?
- self.compiler.append('-std=c99')
- self.compiler_so.append('-std=c99')
elif os.name == 'posix':
import tempfile
import shutil
diff --git a/numpy/distutils/tests/test_ccompiler.py b/numpy/distutils/tests/test_ccompiler.py
deleted file mode 100644
index 72aa8227c..000000000
--- a/numpy/distutils/tests/test_ccompiler.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from distutils.ccompiler import new_compiler
-
-from numpy.distutils.numpy_distribution import NumpyDistribution
-
-def test_ccompiler():
- '''
- scikit-image/scikit-image issue 4369
- We unconditionally add ``-std-c99`` to the gcc compiler in order
- to support c99 with very old gcc compilers. However the same call
- is used to get the flags for the c++ compiler, just with a kwarg.
- Make sure in this case, where it would not be legal, the option is **not** added
- '''
- dist = NumpyDistribution()
- compiler = new_compiler()
- compiler.customize(dist)
- if hasattr(compiler, 'compiler') and 'gcc' in compiler.compiler[0]:
- assert 'c99' in ' '.join(compiler.compiler)
-
- compiler = new_compiler()
- compiler.customize(dist, need_cxx=True)
- if hasattr(compiler, 'compiler') and 'gcc' in compiler.compiler[0]:
- assert 'c99' not in ' '.join(compiler.compiler)