summaryrefslogtreecommitdiff
path: root/external/boost/gcc6-warnings.patch.0
blob: 66ea135c0a168cc58a330a9bbccc679badfdd9fb (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- boost/function/function_base.hpp
+++ boost/function/function_base.hpp
@@ -305,7 +305,21 @@
           if (op == clone_functor_tag || op == move_functor_tag) {
             const functor_type* in_functor = 
               static_cast<const functor_type*>(static_cast<void*>(&in_buffer.data));
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#if defined __clang__
+#if __has_warning("-Wplacement-new")
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
+#else
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
+#endif
             new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
             if (op == move_functor_tag) {
               functor_type* f = static_cast<functor_type*>(static_cast<void*>(&in_buffer.data));
--- boost/function/function_template.hpp
+++ boost/function/function_template.hpp
@@ -569,7 +569,21 @@
         void 
         assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
         {
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#if defined __clang__
+#if __has_warning("-Wplacement-new")
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
+#else
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#endif
+#endif
           new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
         }
         template<typename FunctionObj,typename Allocator>
         void 
--- boost/multi_index/detail/index_node_base.hpp
+++ boost/multi_index/detail/index_node_base.hpp
@@ -51,7 +51,14 @@
 
   value_type& value()
   {
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
     return *reinterpret_cast<value_type*>(&this->space);
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
   }
 
   const value_type& value()const