From c9f2629808ecb543efd852df54e57bb75dec9bb1 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Fri, 7 Sep 2018 11:23:57 -0600 Subject: 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. --- tools/travis-test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') 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 -- cgit v1.2.1