summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-09-07 11:23:57 -0600
committerCharles Harris <charlesr.harris@gmail.com>2018-09-07 12:55:09 -0600
commitc9f2629808ecb543efd852df54e57bb75dec9bb1 (patch)
treee2efc6bc88f0b2d1e5396865c4c2dd32eea819c5 /tools
parentdf35b3d1dbf2750c5c745c608ad3b16559c6b22b (diff)
downloadnumpy-c9f2629808ecb543efd852df54e57bb75dec9bb1.tar.gz
TST: Start testing with "-std=c99" on travisCI.
[skip appveyor] C99 looks to work with gcc for all the Python versions we currently support. Testing with c99 is a step forward in testing #11888 before it gets merged after we drop Python 2.7 support.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/travis-test.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index d95805cee..84a57b1de 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -28,12 +28,16 @@ fi
werrors="-Werror=declaration-after-statement -Werror=vla "
werrors+="-Werror=nonnull -Werror=pointer-arith"
+# build with c99 by default
+
setup_base()
{
# use default python flags but remoge sign-compare
sysflags="$($PYTHON -c "from distutils import sysconfig; \
print (sysconfig.get_config_var('CFLAGS'))")"
export CFLAGS="$sysflags $werrors -Wlogical-op -Wno-sign-compare"
+ # use c99
+ export CFLAGS=$CFLAGS" -std=c99"
# We used to use 'setup.py install' here, but that has the terrible
# behaviour that if a copy of the package is already installed in the
# install location, then the new copy just gets dropped on top of it.
@@ -171,6 +175,8 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
$PIP install -U virtualenv
# ensure some warnings are not issued
export CFLAGS=$CFLAGS" -Wno-sign-compare -Wno-unused-result"
+ # use c99
+ export CFLAGS=$CFLAGS" -std=c99"
# adjust gcc flags if C coverage requested
if [ -n "$RUN_COVERAGE" ]; then
export NPY_DISTUTILS_APPEND_FLAGS=1
@@ -196,6 +202,8 @@ elif [ -n "$USE_SDIST" ] && [ $# -eq 0 ]; then
$PYTHON -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# ensure some warnings are not issued
export CFLAGS=$CFLAGS" -Wno-sign-compare -Wno-unused-result"
+ # use c99
+ export CFLAGS=$CFLAGS" -std=c99"
$PYTHON setup.py sdist
# Make another virtualenv to install into
virtualenv --python=`which $PYTHON` venv-for-wheel