Skip to content

Commit c0955b2

Browse files
committed
disable TBB pragmas (required for CRAN submission)
1 parent ff4f09d commit c0955b2

File tree

87 files changed

+304
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+304
-274
lines changed

src/Makevars.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ endif
9393
# as TBB uses a number of #pragmas and compiler-specific switches depending
9494
# on the compiler and machine being compiled for, and it selects and activates
9595
# those switches only after confirming the specific compiler features it needs.
96+
# Set VERBOSE=1 to have a more verbose install.
9697
ifneq ($(OS), Windows_NT)
97-
MAKE_ARGS += >/dev/null 2>&1
98+
ifeq ($(VERBOSE),)
99+
MAKE_ARGS += >/dev/null 2>&1
100+
endif
98101
endif
99102

100103
.PHONY: all tbb

src/tbb/include/tbb/atomic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
#if _MSC_VER && !__INTEL_COMPILER
3131
// Suppress overzealous compiler warnings till the end of the file
32-
#pragma warning (push)
33-
#pragma warning (disable: 4244 4267 4512)
32+
// #pragma warning (push)
33+
// #pragma warning (disable: 4244 4267 4512)
3434
#endif
3535

3636
namespace tbb {
@@ -548,7 +548,7 @@ inline atomic<T>& as_atomic( T& t ) {
548548
} // namespace tbb
549549

550550
#if _MSC_VER && !__INTEL_COMPILER
551-
#pragma warning (pop)
551+
// #pragma warning (pop)
552552
#endif // warnings are restored
553553

554554
#endif /* __TBB_atomic_H */

src/tbb/include/tbb/cache_aligned_allocator.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ namespace internal {
4848

4949
#if _MSC_VER && !defined(__INTEL_COMPILER)
5050
// Workaround for erroneous "unreferenced parameter" warning in method destroy.
51-
#pragma warning (push)
52-
#pragma warning (disable: 4100)
51+
// #pragma warning (push)
52+
// #pragma warning (disable: 4100)
5353
#endif
5454

5555
//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5
@@ -109,7 +109,7 @@ class cache_aligned_allocator {
109109
};
110110

111111
#if _MSC_VER && !defined(__INTEL_COMPILER)
112-
#pragma warning (pop)
112+
// #pragma warning (pop)
113113
#endif // warning 4100 is back
114114

115115
//! Analogous to std::allocator<void>, as defined in ISO C++ Standard, Section 20.4.1
@@ -151,13 +151,13 @@ class cache_aligned_resource : public std::pmr::memory_resource {
151151
__TBB_ASSERT(base != 0, "Upstream resource returned NULL.");
152152
#if _MSC_VER && !defined(__INTEL_COMPILER)
153153
// unary minus operator applied to unsigned type, result still unsigned
154-
#pragma warning(push)
155-
#pragma warning(disable: 4146 4706)
154+
// #pragma warning(push)
155+
// #pragma warning(disable: 4146 4706)
156156
#endif
157157
// Round up to the next cache line (align the base address)
158158
uintptr_t result = (base + cache_line_alignment) & -cache_line_alignment;
159159
#if _MSC_VER && !defined(__INTEL_COMPILER)
160-
#pragma warning(pop)
160+
// #pragma warning(pop)
161161
#endif
162162
// Record where block actually starts.
163163
((uintptr_t*)result)[-1] = base;

src/tbb/include/tbb/concurrent_hash_map.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ namespace interface5 {
535535

536536
#if _MSC_VER && !defined(__INTEL_COMPILER)
537537
// Suppress "conditional expression is constant" warning.
538-
#pragma warning( push )
539-
#pragma warning( disable: 4127 )
538+
// #pragma warning( push )
539+
// #pragma warning( disable: 4127 )
540540
#endif
541541

542542
//! Unordered map from Key to T.
@@ -1625,7 +1625,7 @@ inline void swap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash
16251625
{ a.swap( b ); }
16261626

16271627
#if _MSC_VER && !defined(__INTEL_COMPILER)
1628-
#pragma warning( pop )
1628+
// #pragma warning( pop )
16291629
#endif // warning 4127 is back
16301630

16311631
} // namespace tbb

src/tbb/include/tbb/concurrent_vector.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434

3535
#if _MSC_VER==1500 && !__INTEL_COMPILER
3636
// VS2008/VC9 seems to have an issue; limits pull in math.h
37-
#pragma warning( push )
38-
#pragma warning( disable: 4985 )
37+
// #pragma warning( push )
38+
// #pragma warning( disable: 4985 )
3939
#endif
4040
#include <limits> /* std::numeric_limits */
4141
#if _MSC_VER==1500 && !__INTEL_COMPILER
42-
#pragma warning( pop )
42+
// #pragma warning( pop )
4343
#endif
4444

4545
#if __TBB_INITIALIZER_LISTS_PRESENT
@@ -48,11 +48,11 @@
4848

4949
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
5050
// Workaround for overzealous compiler warnings in /Wp64 mode
51-
#pragma warning (push)
51+
// #pragma warning (push)
5252
#if defined(_Wp64)
53-
#pragma warning (disable: 4267)
53+
// #pragma warning (disable: 4267)
5454
#endif
55-
#pragma warning (disable: 4127) //warning C4127: conditional expression is constant
55+
// #pragma warning (disable: 4127) //warning C4127: conditional expression is constant
5656
#endif
5757

5858
namespace tbb {
@@ -1175,8 +1175,8 @@ template<typename T, typename A = cache_aligned_allocator<T>
11751175
#endif /* __TBB_CPP17_DEDUCTION_GUIDES_PRESENT */
11761176

11771177
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
1178-
#pragma warning (push)
1179-
#pragma warning (disable: 4701) // potentially uninitialized local variable "old"
1178+
// #pragma warning (push)
1179+
// #pragma warning (disable: 4701) // potentially uninitialized local variable "old"
11801180
#endif
11811181
template<typename T, class A>
11821182
void concurrent_vector<T, A>::shrink_to_fit() {
@@ -1198,7 +1198,7 @@ void concurrent_vector<T, A>::shrink_to_fit() {
11981198
}
11991199
}
12001200
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
1201-
#pragma warning (pop)
1201+
// #pragma warning (pop)
12021202
#endif // warning 4701 is back
12031203

12041204
template<typename T, class A>
@@ -1322,8 +1322,8 @@ void concurrent_vector<T, A>::assign_array( void* dst, const void* src, size_typ
13221322

13231323
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
13241324
// Workaround for overzealous compiler warning
1325-
#pragma warning (push)
1326-
#pragma warning (disable: 4189)
1325+
// #pragma warning (push)
1326+
// #pragma warning (disable: 4189)
13271327
#endif
13281328
template<typename T, class A>
13291329
void concurrent_vector<T, A>::destroy_array( void* begin, size_type n ) {
@@ -1332,7 +1332,7 @@ void concurrent_vector<T, A>::destroy_array( void* begin, size_type n ) {
13321332
array[j-1].~T(); // destructors are supposed to not throw any exceptions
13331333
}
13341334
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
1335-
#pragma warning (pop)
1335+
// #pragma warning (pop)
13361336
#endif // warning 4189 is back
13371337

13381338
// concurrent_vector's template functions
@@ -1375,7 +1375,7 @@ inline void swap(concurrent_vector<T, A> &a, concurrent_vector<T, A> &b)
13751375
} // namespace tbb
13761376

13771377
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
1378-
#pragma warning (pop)
1378+
// #pragma warning (pop)
13791379
#endif // warning 4267,4127 are back
13801380

13811381
#endif /* __TBB_concurrent_vector_H */

src/tbb/include/tbb/flow_graph_opencl_node.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,23 +1123,23 @@ class opencl_factory {
11231123
cl_command_queue_properties props = (*d).out_of_order_exec_mode_on_host_present() ? CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE : 0;
11241124
// Suppress "declared deprecated" warning for the next line.
11251125
#if __TBB_GCC_WARNING_SUPPRESSION_PRESENT
1126-
#pragma GCC diagnostic push
1127-
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1126+
// #pragma GCC diagnostic push
1127+
// #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
11281128
#endif
11291129
#if _MSC_VER || __INTEL_COMPILER
1130-
#pragma warning( push )
1130+
// #pragma warning( push )
11311131
#if __INTEL_COMPILER
1132-
#pragma warning (disable: 1478)
1132+
// #pragma warning (disable: 1478)
11331133
#else
1134-
#pragma warning (disable: 4996)
1134+
// #pragma warning (disable: 4996)
11351135
#endif
11361136
#endif
11371137
cq = clCreateCommandQueue(ctx, (*d).my_cl_device_id, props, &err2);
11381138
#if _MSC_VER || __INTEL_COMPILER
1139-
#pragma warning( pop )
1139+
// #pragma warning( pop )
11401140
#endif
11411141
#if __TBB_GCC_WARNING_SUPPRESSION_PRESENT
1142-
#pragma GCC diagnostic pop
1142+
// #pragma GCC diagnostic pop
11431143
#endif
11441144
}
11451145
enforce_cl_retcode(err2, "Failed to create command queue");

src/tbb/include/tbb/internal/_concurrent_queue_impl.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ class concurrent_queue_page_allocator
120120

121121
#if _MSC_VER && !defined(__INTEL_COMPILER)
122122
// unary minus operator applied to unsigned type, result still unsigned
123-
#pragma warning( push )
124-
#pragma warning( disable: 4146 )
123+
// #pragma warning( push )
124+
// #pragma warning( disable: 4146 )
125125
#endif
126126

127127
//! A queue using simple locking.
@@ -387,7 +387,7 @@ micro_queue_pop_finalizer<T>::~micro_queue_pop_finalizer() {
387387
}
388388

389389
#if _MSC_VER && !defined(__INTEL_COMPILER)
390-
#pragma warning( pop )
390+
// #pragma warning( pop )
391391
#endif // warning 4146 is back
392392

393393
template<typename T> class concurrent_queue_iterator_rep ;
@@ -534,12 +534,12 @@ bool concurrent_queue_base_v3<T>::internal_try_pop( void* dst ) {
534534
// Queue had item with ticket k when we looked. Attempt to get that item.
535535
ticket tk=k;
536536
#if defined(_MSC_VER) && defined(_Wp64)
537-
#pragma warning (push)
538-
#pragma warning (disable: 4267)
537+
// #pragma warning (push)
538+
// #pragma warning (disable: 4267)
539539
#endif
540540
k = r.head_counter.compare_and_swap( tk+1, tk );
541541
#if defined(_MSC_VER) && defined(_Wp64)
542-
#pragma warning (pop)
542+
// #pragma warning (pop)
543543
#endif
544544
if( k==tk )
545545
break;

src/tbb/include/tbb/internal/_concurrent_skip_list_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
#include <tuple>
4545

4646
#if _MSC_VER
47-
#pragma warning(disable: 4189) // warning 4189 -- local variable is initialized but not referenced
48-
#pragma warning(disable: 4127) // warning 4127 -- while (true) has a constant expression in it
47+
// #pragma warning(disable: 4189) // warning 4189 -- local variable is initialized but not referenced
48+
// #pragma warning(disable: 4127) // warning 4127 -- while (true) has a constant expression in it
4949
#endif
5050

5151
namespace tbb {

src/tbb/include/tbb/internal/_concurrent_unordered_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ class split_ordered_list
687687
};
688688

689689
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
690-
#pragma warning(push)
691-
#pragma warning(disable: 4127) // warning C4127: conditional expression is constant
690+
// #pragma warning(push)
691+
// #pragma warning(disable: 4127) // warning C4127: conditional expression is constant
692692
#endif
693693

694694
template <typename Traits>
@@ -1657,7 +1657,7 @@ class concurrent_unordered_base : public Traits
16571657
atomic<raw_iterator*> my_buckets[pointers_per_table]; // The segment table
16581658
};
16591659
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
1660-
#pragma warning(pop) // warning 4127 is back
1660+
// #pragma warning(pop) // warning 4127 is back
16611661
#endif
16621662

16631663
} // namespace internal

src/tbb/include/tbb/internal/_flow_graph_node_impl.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,12 @@ namespace internal {
486486
}
487487
task* successor_task = successors().try_put_task(v);
488488
#if _MSC_VER && !__INTEL_COMPILER
489-
#pragma warning (push)
490-
#pragma warning (disable: 4127) /* suppress conditional expression is constant */
489+
// #pragma warning (push)
490+
// #pragma warning (disable: 4127) /* suppress conditional expression is constant */
491491
#endif
492492
if(internal::has_policy<lightweight, Policy>::value) {
493493
#if _MSC_VER && !__INTEL_COMPILER
494-
#pragma warning (pop)
494+
// #pragma warning (pop)
495495
#endif
496496
if(!successor_task) {
497497
// Return confirmative status since current
@@ -753,12 +753,12 @@ namespace internal {
753753
return NULL;
754754
}
755755
#if _MSC_VER && !__INTEL_COMPILER
756-
#pragma warning (push)
757-
#pragma warning (disable: 4127) /* suppress conditional expression is constant */
756+
// #pragma warning (push)
757+
// #pragma warning (disable: 4127) /* suppress conditional expression is constant */
758758
#endif
759759
if(internal::has_policy<lightweight, Policy>::value) {
760760
#if _MSC_VER && !__INTEL_COMPILER
761-
#pragma warning (pop)
761+
// #pragma warning (pop)
762762
#endif
763763
return apply_body_bypass( continue_msg() );
764764
}

0 commit comments

Comments
 (0)