From da57be191af074a33a7c21492a12b8367d798a48 Mon Sep 17 00:00:00 2001 From: Mike Lischke Date: Thu, 10 Nov 2016 10:28:13 +0100 Subject: [PATCH] Avoid warnings when building on Linux. --- .../test/org/antlr/v4/test/runtime/cpp/BaseCppTest.java | 2 +- runtime/Cpp/runtime/src/antlr4-common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/BaseCppTest.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/BaseCppTest.java index ff211e6b3..e3a389601 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/BaseCppTest.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/BaseCppTest.java @@ -685,7 +685,7 @@ public abstract class BaseCppTest { } try { - List command2 = new ArrayList(Arrays.asList("clang++", "-std=c++11", "-I", includePath, "-L.", "-lantlr4-runtime")); + List command2 = new ArrayList(Arrays.asList("clang++", "-std=c++11", "-I", includePath, "-L.", "-lantlr4-runtime", "-Wno-type-limits")); command2.addAll(allCppFiles(tmpdir)); String output = runCommand(command2.toArray(new String[0]), tmpdir, "building test binary"); if (output == null) { diff --git a/runtime/Cpp/runtime/src/antlr4-common.h b/runtime/Cpp/runtime/src/antlr4-common.h index 34e055fb2..79a35d7b5 100644 --- a/runtime/Cpp/runtime/src/antlr4-common.h +++ b/runtime/Cpp/runtime/src/antlr4-common.h @@ -108,7 +108,7 @@ #define EXPIMP_TEMPLATE #else #define GUID_LIBUUID - #if __GNUC__ >= 4 + #if __GNUC__ >= 6 #define ANTLR4CPP_PUBLIC __attribute__ ((visibility ("default"))) #else #define ANTLR4CPP_PUBLIC