about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch
blob: b8803911968b07cf495e04d1c5de66d395803d4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From e78b2bf6eaa0c43bd76dbb841add167b443d2bb0 Mon Sep 17 00:00:00 2001
From: Mark Benvenuto <mark.benvenuto@mongodb.com>
Date: Mon, 21 Jun 2021 11:36:56 -0400
Subject: [PATCH] SERVER-57688 Fix debug gcc 11 and clang 12 builds on Fedora
 34

---
 SConstruct                              | 4 ----
 src/mongo/db/query/plan_summary_stats.h | 4 +++-
 src/mongo/util/shim_boost_assert.cpp    | 1 +
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/SConstruct b/SConstruct
index 25fd4a248d0c..23cff6f9da53 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3108,10 +3108,6 @@ def doConfigure(myenv):
         # harmful to capture unused variables we are suppressing for now with a plan to fix later.
         AddToCCFLAGSIfSupported(myenv, "-Wno-unused-lambda-capture")
 
-        # This warning was added in clang-5 and incorrectly flags our implementation of
-        # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804
-        AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions")
-
         # Enable sized deallocation support.
         AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation')
 
diff --git a/src/mongo/db/query/plan_summary_stats.h b/src/mongo/db/query/plan_summary_stats.h
index 58677ab20d25..cfaa2053d16f 100644
--- a/src/mongo/db/query/plan_summary_stats.h
+++ b/src/mongo/db/query/plan_summary_stats.h
@@ -29,9 +29,11 @@
 
 #pragma once
 
-#include "mongo/util/container_size_helper.h"
+#include <optional>
 #include <string>
 
+#include "mongo/util/container_size_helper.h"
+
 namespace mongo {
 
 /**