summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2021-03-16 20:11:05 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2021-03-17 22:55:35 +0000
commit25043544897e62d9431d5d39e21823cface3743f (patch)
tree465d8301bd63f11fc30800f193d48960fd7e92c0
parent34acf2cea6b65a8d03324b5f42cae9841ed5a2d9 (diff)
downloadswig-25043544897e62d9431d5d39e21823cface3743f.tar.gz
Add ruby 3.0 testing
testflags tweak for C standard > c90 Only add -Wdeclaration-after-statement for > c90 as c99 allows declarations after a statement.
-rw-r--r--.travis.yml8
-rwxr-xr-xTools/testflags.py8
2 files changed, 12 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 9f1fd1fe8..92acc7c27 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,7 +62,7 @@ matrix:
dist: xenial
- compiler: gcc
os: linux
- env: SWIGLANG=go VER=1.12
+ env: SWIGLANG=go VER=1.12 CSTD=gnu99
dist: xenial
- compiler: gcc
os: linux
@@ -278,6 +278,10 @@ matrix:
dist: xenial
- compiler: gcc
os: linux
+ env: SWIGLANG=ruby VER=3.0 CSTD=c99
+ dist: xenial
+ - compiler: gcc
+ os: linux
env: SWIGLANG=scilab
dist: xenial
- compiler: gcc
@@ -369,7 +373,7 @@ matrix:
- compiler: clang
os: osx
osx_image: xcode12.2
- env: SWIGLANG=go
+ env: SWIGLANG=go CSTD=gnu99
- compiler: clang
os: osx
osx_image: xcode12.2
diff --git a/Tools/testflags.py b/Tools/testflags.py
index f3d216b59..16e4d8aee 100755
--- a/Tools/testflags.py
+++ b/Tools/testflags.py
@@ -3,11 +3,15 @@
def get_cflags(language, std, compiler):
if std == None or len(std) == 0:
std = "gnu89"
- c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wdeclaration-after-statement -Wmissing-field-initializers"
+ c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wmissing-field-initializers"
+ if std == "gnu89" or std == "gnu90":
+ # gnu89 standard allows declaration after headers
+ # use c99 or gnu99 if feature is necessary for using target language
+ c_common = c_common + " -Wdeclaration-after-statement"
cflags = {
"csharp":"-Werror " + c_common,
"d":"-Werror " + c_common,
- "go":"-Werror " + c_common + " -Wno-declaration-after-statement",
+ "go":"-Werror " + c_common,
"guile":"-Werror " + c_common,
"java":"-Werror " + c_common,
"javascript":"-Werror " + c_common,