diff options
-rw-r--r-- | .travis.yml | 8 | ||||
-rwxr-xr-x | Tools/testflags.py | 8 |
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, |