summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2016-10-31 13:27:15 -0400
committerMathias Stearn <redbeard0531@gmail.com>2016-11-14 18:45:25 -0500
commit8c1a3c4409f423df0d10bebf764ae75a84ad21f1 (patch)
tree3db7a51159873a81834d3fa8b0b814b2aa4c483e
parent1b3b7381a34b65cb24fa1fa3e91afd3bac69cbdf (diff)
downloadmongo-8c1a3c4409f423df0d10bebf764ae75a84ad21f1.tar.gz
SERVER-26845 Fix compile with clang-3.9
(cherry picked from commit b0885dbb66f94332a3cf8ab5bf2565b70cd59384)
-rw-r--r--SConstruct6
-rw-r--r--src/mongo/bson/bson_validate_test.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index e64a03bb2da..7eb1536dc6e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1812,6 +1812,12 @@ def doConfigure(myenv):
# see: http://stackoverflow.com/questions/21755206/how-to-get-around-gcc-void-b-4-may-be-used-uninitialized-in-this-funct
AddToCXXFLAGSIfSupported(myenv, "-Wno-maybe-uninitialized")
+ # Disable warning about templates that can't be implicitly instantiated. It is an attempt to
+ # make a link error into an easier-to-debug compiler failure, but it triggers false
+ # positives if explicit instantiation is used in a TU that can see the full definition. This
+ # is a problem at least for the S2 headers.
+ AddToCXXFLAGSIfSupported(myenv, "-Wno-undefined-var-template")
+
# Check if we need to disable null-conversion warnings
if myenv.ToolchainIs('clang'):
def CheckNullConversion(context):
diff --git a/src/mongo/bson/bson_validate_test.cpp b/src/mongo/bson/bson_validate_test.cpp
index 41215a8db0b..d1648fc2c10 100644
--- a/src/mongo/bson/bson_validate_test.cpp
+++ b/src/mongo/bson/bson_validate_test.cpp
@@ -124,7 +124,7 @@ TEST(BSONValidate, MuckingData1) {
char* data = const_cast<char*>(mine.objdata());
- data[i] = 200;
+ data[i] = 0xc8U;
numToRun++;
if (mine.valid()) {