[libcxx-commits] [pstl] 3b9a1bb - [pstl] Fix -Wundef errors in the test suite

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 26 12:23:14 PDT 2021


Author: Louis Dionne
Date: 2021-05-26T15:24:49-04:00
New Revision: 3b9a1bb1af90db9472340ef2122d3855eb9ba3fc

URL: https://github.com/llvm/llvm-project/commit/3b9a1bb1af90db9472340ef2122d3855eb9ba3fc
DIFF: https://github.com/llvm/llvm-project/commit/3b9a1bb1af90db9472340ef2122d3855eb9ba3fc.diff

LOG: [pstl] Fix -Wundef errors in the test suite

Added: 
    

Modified: 
    pstl/include/pstl/internal/algorithm_impl.h
    pstl/include/pstl/internal/execution_defs.h
    pstl/include/pstl/internal/execution_impl.h
    pstl/include/pstl/internal/glue_execution_defs.h
    pstl/include/pstl/internal/numeric_impl.h
    pstl/include/pstl/internal/pstl_config.h
    pstl/include/pstl/internal/unseq_backend_simd.h
    pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
    pstl/test/std/algorithms/alg.merge/merge.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
    pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
    pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
    pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
    pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
    pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
    pstl/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp
    pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
    pstl/test/std/numerics/numeric.ops/scan.pass.cpp
    pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
    pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
    pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
    pstl/test/support/utils.h

Removed: 
    


################################################################################
diff  --git a/pstl/include/pstl/internal/algorithm_impl.h b/pstl/include/pstl/internal/algorithm_impl.h
index d5d9a31179256..1f4d9878d12cc 100644
--- a/pstl/include/pstl/internal/algorithm_impl.h
+++ b/pstl/include/pstl/internal/algorithm_impl.h
@@ -979,7 +979,7 @@ __brick_copy_if(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _
                 _UnaryPredicate __pred,
                 /*vector=*/std::true_type) noexcept
 {
-#if (_PSTL_MONOTONIC_PRESENT)
+#if defined(_PSTL_MONOTONIC_PRESENT)
     return __unseq_backend::__simd_copy_if(__first, __last - __first, __result, __pred);
 #else
     return std::copy_if(__first, __last, __result, __pred);
@@ -1038,7 +1038,7 @@ void
 __brick_copy_by_mask(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result,
                      bool* __restrict __mask, _Assigner __assigner, /*vector=*/std::true_type) noexcept
 {
-#if (_PSTL_MONOTONIC_PRESENT)
+#if defined(_PSTL_MONOTONIC_PRESENT)
     __unseq_backend::__simd_copy_by_mask(__first, __last - __first, __result, __mask, __assigner);
 #else
     __internal::__brick_copy_by_mask(__first, __last, __result, __mask, __assigner, std::false_type());
@@ -1071,7 +1071,7 @@ __brick_partition_by_mask(_RandomAccessIterator1 __first, _RandomAccessIterator1
                           _RandomAccessIterator2 __out_true, _RandomAccessIterator3 __out_false, bool* __mask,
                           /*vector=*/std::true_type) noexcept
 {
-#if (_PSTL_MONOTONIC_PRESENT)
+#if defined(_PSTL_MONOTONIC_PRESENT)
     __unseq_backend::__simd_partition_by_mask(__first, __last - __first, __out_true, __out_false, __mask);
 #else
     __internal::__brick_partition_by_mask(__first, __last, __out_true, __out_false, __mask, std::false_type());
@@ -1319,7 +1319,7 @@ _RandomAccessIterator2
 __brick_unique_copy(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result,
                     _BinaryPredicate __pred, /*vector=*/std::true_type) noexcept
 {
-#if (_PSTL_MONOTONIC_PRESENT)
+#if defined(_PSTL_MONOTONIC_PRESENT)
     return __unseq_backend::__simd_unique_copy(__first, __last - __first, __result, __pred);
 #else
     return std::unique_copy(__first, __last, __result, __pred);
@@ -1536,7 +1536,7 @@ _ForwardIterator
 __brick_rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
                /*is_vector=*/std::false_type) noexcept
 {
-#if _PSTL_CPP11_STD_ROTATE_BROKEN
+#if defined(_PSTL_CPP11_STD_ROTATE_BROKEN)
     std::rotate(__first, __middle, __last);
     return std::next(__first, std::distance(__middle, __last));
 #else
@@ -2055,7 +2055,7 @@ __brick_partition_copy(_RandomAccessIterator1 __first, _RandomAccessIterator1 __
                        _RandomAccessIterator3 __out_false, _UnaryPredicate __pred,
                        /*is_vector=*/std::true_type) noexcept
 {
-#if (_PSTL_MONOTONIC_PRESENT)
+#if defined(_PSTL_MONOTONIC_PRESENT)
     return __unseq_backend::__simd_partition_copy(__first, __last - __first, __out_true, __out_false, __pred);
 #else
     return std::partition_copy(__first, __last, __out_true, __out_false, __pred);
@@ -2232,7 +2232,7 @@ __pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __
                     _RandomAccessIterator1 __j1 = __first + (__j - __d_first);
 
                 // 1. Copy elements from input to output
-#if !_PSTL_ICC_18_OMP_SIMD_BROKEN
+#if !defined(_PSTL_ICC_18_OMP_SIMD_BROKEN)
                     __internal::__brick_copy(__i1, __j1, __i, __is_vector);
 #else
                     std::copy(__i1, __j1, __i);
@@ -2583,7 +2583,7 @@ _RandomAccessIterator
 __brick_remove_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _UnaryPredicate __pred,
                   /* __is_vector = */ std::true_type) noexcept
 {
-#if _PSTL_MONOTONIC_PRESENT
+#if defined(_PSTL_MONOTONIC_PRESENT)
     return __unseq_backend::__simd_remove_if(__first, __last - __first, __pred);
 #else
     return std::remove_if(__first, __last, __pred);
@@ -3437,7 +3437,7 @@ _RandomAccessIterator
 __brick_min_element(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
                     /* __is_vector = */ std::true_type) noexcept
 {
-#if _PSTL_UDR_PRESENT
+#if defined(_PSTL_UDR_PRESENT)
     return __unseq_backend::__simd_min_element(__first, __last - __first, __comp);
 #else
     return std::min_element(__first, __last, __comp);
@@ -3492,7 +3492,7 @@ std::pair<_RandomAccessIterator, _RandomAccessIterator>
 __brick_minmax_element(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
                        /* __is_vector = */ std::true_type) noexcept
 {
-#if _PSTL_UDR_PRESENT
+#if defined(_PSTL_UDR_PRESENT)
     return __unseq_backend::__simd_minmax_element(__first, __last - __first, __comp);
 #else
     return std::minmax_element(__first, __last, __comp);
@@ -3542,7 +3542,7 @@ std::pair<_ForwardIterator1, _ForwardIterator2>
 __mismatch_serial(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
                   _ForwardIterator2 __last2, _BinaryPredicate __pred)
 {
-#if _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT
+#if defined(_PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT)
     return std::mismatch(__first1, __last1, __first2, __last2, __pred);
 #else
     for (; __first1 != __last1 && __first2 != __last2 && __pred(*__first1, *__first2); ++__first1, ++__first2)

diff  --git a/pstl/include/pstl/internal/execution_defs.h b/pstl/include/pstl/internal/execution_defs.h
index 28e89f5aa4e88..1e232fc858daa 100644
--- a/pstl/include/pstl/internal/execution_defs.h
+++ b/pstl/include/pstl/internal/execution_defs.h
@@ -139,7 +139,7 @@ struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_ty
 {
 };
 
-#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
+#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
 template <class T>
 constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<T>::value;
 #endif

diff  --git a/pstl/include/pstl/internal/execution_impl.h b/pstl/include/pstl/internal/execution_impl.h
index 99e80818cbbaf..dfe214bab6cb7 100644
--- a/pstl/include/pstl/internal/execution_impl.h
+++ b/pstl/include/pstl/internal/execution_impl.h
@@ -84,7 +84,7 @@ using __allow_parallel =
 template <typename _ExecutionPolicy, typename... _IteratorTypes>
 typename std::conjunction<__allow_vector<_ExecutionPolicy>,
                           __is_random_access_iterator<_IteratorTypes>...>::type
-__is_vectorization_preferred(_ExecutionPolicy&& __exec)
+__is_vectorization_preferred(_ExecutionPolicy&&)
 {
     return {};
 }
@@ -92,7 +92,7 @@ __is_vectorization_preferred(_ExecutionPolicy&& __exec)
 template <typename _ExecutionPolicy, typename... _IteratorTypes>
 typename std::conjunction<__allow_parallel<_ExecutionPolicy>,
                           __is_random_access_iterator<_IteratorTypes>...>::type
-__is_parallelization_preferred(_ExecutionPolicy&& __exec)
+__is_parallelization_preferred(_ExecutionPolicy&&)
 {
     return {};
 }

diff  --git a/pstl/include/pstl/internal/glue_execution_defs.h b/pstl/include/pstl/internal/glue_execution_defs.h
index b294976bc8b03..df9a477f721ea 100644
--- a/pstl/include/pstl/internal/glue_execution_defs.h
+++ b/pstl/include/pstl/internal/glue_execution_defs.h
@@ -19,8 +19,8 @@ namespace std
 {
 // Type trait
 using __pstl::execution::is_execution_policy;
-#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
-#    if __INTEL_COMPILER
+#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
+#    if defined(__INTEL_COMPILER)
 template <class T>
 constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
 #    else

diff  --git a/pstl/include/pstl/internal/numeric_impl.h b/pstl/include/pstl/internal/numeric_impl.h
index e90d865263516..6a498b6d11ae2 100644
--- a/pstl/include/pstl/internal/numeric_impl.h
+++ b/pstl/include/pstl/internal/numeric_impl.h
@@ -191,7 +191,7 @@ __brick_transform_scan(_RandomAccessIterator __first, _RandomAccessIterator __la
                        _UnaryOperation __unary_op, _Tp __init, _BinaryOperation __binary_op, _Inclusive,
                        /*is_vector=*/std::true_type) noexcept
 {
-#if (_PSTL_UDS_PRESENT)
+#if defined(_PSTL_UDS_PRESENT)
     return __unseq_backend::__simd_scan(__first, __last - __first, __result, __unary_op, __init, __binary_op,
                                         _Inclusive());
 #else

diff  --git a/pstl/include/pstl/internal/pstl_config.h b/pstl/include/pstl/internal/pstl_config.h
index 88fa2d17fae16..0a5fae878e368 100644
--- a/pstl/include/pstl/internal/pstl_config.h
+++ b/pstl/include/pstl/internal/pstl_config.h
@@ -60,13 +60,15 @@
 // the actual GCC version on the system.
 #define _PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 
-#if __clang__
+#if defined(__clang__)
 // according to clang documentation, version can be vendor specific
 #    define _PSTL_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
 #endif
 
 // Enable SIMD for compilers that support OpenMP 4.0
-#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
+#if (defined(_OPENMP) && _OPENMP >= 201307) || \
+    (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1600) || \
+    (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
     defined(__clang__)
 #    define _PSTL_PRAGMA_SIMD _PSTL_PRAGMA(omp simd)
 #    define _PSTL_PRAGMA_DECLARE_SIMD _PSTL_PRAGMA(omp declare simd)
@@ -81,13 +83,13 @@
 #    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM)
 #endif //Enable SIMD
 
-#if (__INTEL_COMPILER)
+#if defined(__INTEL_COMPILER)
 #    define _PSTL_PRAGMA_FORCEINLINE _PSTL_PRAGMA(forceinline)
 #else
 #    define _PSTL_PRAGMA_FORCEINLINE
 #endif
 
-#if (__INTEL_COMPILER >= 1900)
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900
 #    define _PSTL_PRAGMA_SIMD_SCAN(PRM) _PSTL_PRAGMA(omp simd reduction(inscan, PRM))
 #    define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan inclusive(PRM))
 #    define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan exclusive(PRM))
@@ -100,32 +102,47 @@
 // Should be defined to 1 for environments with a vendor implementation of C++17 execution policies
 #define _PSTL_CPP17_EXECUTION_POLICIES_PRESENT (_MSC_VER >= 1912)
 
-#define _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT                                                                      \
-    (_MSC_VER >= 1900 || __cplusplus >= 201300L || __cpp_lib_robust_nonmodifying_seq_ops == 201304)
-#define _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT                                                                      \
-    (_MSC_VER >= 1900 || __cplusplus >= 201402L || __cpp_lib_make_reverse_iterator == 201402)
-#define _PSTL_CPP14_INTEGER_SEQUENCE_PRESENT (_MSC_VER >= 1900 || __cplusplus >= 201402L)
-#define _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT                                                                         \
-    (!__INTEL_COMPILER || __INTEL_COMPILER >= 1700) && (_MSC_FULL_VER >= 190023918 || __cplusplus >= 201402L)
+#if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
+    __cplusplus >= 201300L || \
+    __cpp_lib_robust_nonmodifying_seq_ops == 201304
+#   define _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT
+#endif
+#if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
+    __cplusplus >= 201402L || \
+    __cpp_lib_make_reverse_iterator == 201402
+#   define _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT
+#endif
+#if (defined(_MSC_VER) && _MSC_VER >= 1900) || __cplusplus >= 201402L
+#   define _PSTL_CPP14_INTEGER_SEQUENCE_PRESENT
+#endif
+#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || \
+    (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023918) || \
+    __cplusplus >= 201402L
+#   define _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
+#endif
 
-#define _PSTL_EARLYEXIT_PRESENT (__INTEL_COMPILER >= 1800)
-#define _PSTL_MONOTONIC_PRESENT (__INTEL_COMPILER >= 1800)
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1800
+#   define _PSTL_EARLYEXIT_PRESENT
+#   define _PSTL_MONOTONIC_PRESENT
+#endif
 
-#if (__INTEL_COMPILER >= 1900 || !defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900 || _OPENMP >= 201307)
-#    define _PSTL_UDR_PRESENT 1
-#else
-#    define _PSTL_UDR_PRESENT 0
+#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900) || \
+    (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
+    (defined(_OPENMP) && _OPENMP >= 201307)
+#    define _PSTL_UDR_PRESENT
 #endif
 
-#define _PSTL_UDS_PRESENT (__INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626)
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626
+#   define _PSTL_UDS_PRESENT
+#endif
 
-#if _PSTL_EARLYEXIT_PRESENT
+#if defined(_PSTL_EARLYEXIT_PRESENT)
 #    define _PSTL_PRAGMA_SIMD_EARLYEXIT _PSTL_PRAGMA(omp simd early_exit)
 #else
 #    define _PSTL_PRAGMA_SIMD_EARLYEXIT
 #endif
 
-#if _PSTL_MONOTONIC_PRESENT
+#if defined(_PSTL_MONOTONIC_PRESENT)
 #    define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _PSTL_PRAGMA(omp ordered simd monotonic(PRM))
 #    define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) _PSTL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2))
 #else
@@ -143,7 +160,7 @@
 #define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)                                                                       \
     _PSTL_PRAGMA(omp declare reduction(NAME:OP : omp_out(omp_in)) initializer(omp_priv = omp_orig))
 
-#if (__INTEL_COMPILER >= 1600)
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1600
 #    define _PSTL_PRAGMA_VECTOR_UNALIGNED _PSTL_PRAGMA(vector unaligned)
 #else
 #    define _PSTL_PRAGMA_VECTOR_UNALIGNED
@@ -156,7 +173,7 @@
 #    define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
 #endif
 
-#if _MSC_VER || __INTEL_COMPILER //the preprocessors don't type a message location
+#if defined(_MSC_VER) || defined(__INTEL_COMPILER) // the preprocessors don't type a message location
 #    define _PSTL_PRAGMA_LOCATION __FILE__ ":" _PSTL_STRING(__LINE__) ": [Parallel STL message]: "
 #else
 #    define _PSTL_PRAGMA_LOCATION " [Parallel STL message]: "
@@ -164,7 +181,7 @@
 
 #define _PSTL_PRAGMA_MESSAGE_IMPL(x) _PSTL_PRAGMA(message(_PSTL_STRING_CONCAT(_PSTL_PRAGMA_LOCATION, x)))
 
-#if _PSTL_USAGE_WARNINGS
+#if defined(_PSTL_USAGE_WARNINGS)
 #    define _PSTL_PRAGMA_MESSAGE(x) _PSTL_PRAGMA_MESSAGE_IMPL(x)
 #    define _PSTL_PRAGMA_MESSAGE_POLICIES(x) _PSTL_PRAGMA_MESSAGE_IMPL(x)
 #else
@@ -173,8 +190,13 @@
 #endif
 
 // broken macros
-#define _PSTL_CPP11_STD_ROTATE_BROKEN ((__GLIBCXX__ && __GLIBCXX__ < 20150716) || (_MSC_VER && _MSC_VER < 1800))
+#if (defined(__GLIBCXX__) && __GLIBCXX__ < 20150716) || \
+    (defined(_MSC_VER) && _MSC_VER < 1800)
+#   define _PSTL_CPP11_STD_ROTATE_BROKEN
+#endif
 
-#define _PSTL_ICC_18_OMP_SIMD_BROKEN (__INTEL_COMPILER == 1800)
+#if defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1800
+#   define _PSTL_ICC_18_OMP_SIMD_BROKEN
+#endif
 
 #endif /* _PSTL_CONFIG_H */

diff  --git a/pstl/include/pstl/internal/unseq_backend_simd.h b/pstl/include/pstl/internal/unseq_backend_simd.h
index 7916d8088a430..af2a143bc58ab 100644
--- a/pstl/include/pstl/internal/unseq_backend_simd.h
+++ b/pstl/include/pstl/internal/unseq_backend_simd.h
@@ -65,7 +65,7 @@ template <class _Index, class _DifferenceType, class _Pred>
 bool
 __simd_or(_Index __first, _DifferenceType __n, _Pred __pred) noexcept
 {
-#if _PSTL_EARLYEXIT_PRESENT
+#if defined(_PSTL_EARLYEXIT_PRESENT)
     _DifferenceType __i;
     _PSTL_PRAGMA_VECTOR_UNALIGNED
     _PSTL_PRAGMA_SIMD_EARLYEXIT
@@ -105,7 +105,7 @@ template <class _Index, class _DifferenceType, class _Compare>
 _Index
 __simd_first(_Index __first, _DifferenceType __begin, _DifferenceType __end, _Compare __comp) noexcept
 {
-#if _PSTL_EARLYEXIT_PRESENT
+#if defined(_PSTL_EARLYEXIT_PRESENT)
     _DifferenceType __i = __begin;
     _PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part
         _PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __end; ++__i)
@@ -165,7 +165,7 @@ template <class _Index1, class _DifferenceType, class _Index2, class _Pred>
 std::pair<_Index1, _Index2>
 __simd_first(_Index1 __first1, _DifferenceType __n, _Index2 __first2, _Pred __pred) noexcept
 {
-#if _PSTL_EARLYEXIT_PRESENT
+#if defined(_PSTL_EARLYEXIT_PRESENT)
     _DifferenceType __i = 0;
     _PSTL_PRAGMA_VECTOR_UNALIGNED
     _PSTL_PRAGMA_SIMD_EARLYEXIT
@@ -387,7 +387,7 @@ __simd_adjacent_find(_Index __first, _Index __last, _BinaryPredicate __pred, boo
     typedef typename std::iterator_traits<_Index>::
diff erence_type _DifferenceType;
     _DifferenceType __i = 0;
 
-#if _PSTL_EARLYEXIT_PRESENT
+#if defined(_PSTL_EARLYEXIT_PRESENT)
     //Some compiler versions fail to compile the following loop when iterators are used. Indices are used instead
     const _DifferenceType __n = __last - __first - 1;
     _PSTL_PRAGMA_VECTOR_UNALIGNED

diff  --git a/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp b/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
index 8e49bf4b719a9..3446d955093ad 100644
--- a/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
+++ b/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
@@ -20,8 +20,8 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename BiDirIt1, typename Size, typename Generator1, typename Generator2, typename Compare>
     void
     operator()(pstl::execution::unsequenced_policy, BiDirIt1 first1, BiDirIt1 last1, BiDirIt1 first2, BiDirIt1 last2,

diff  --git a/pstl/test/std/algorithms/alg.merge/merge.pass.cpp b/pstl/test/std/algorithms/alg.merge/merge.pass.cpp
index c8970e0fb5c39..a09ef4223bf77 100644
--- a/pstl/test/std/algorithms/alg.merge/merge.pass.cpp
+++ b/pstl/test/std/algorithms/alg.merge/merge.pass.cpp
@@ -101,7 +101,7 @@ main()
     test_merge_by_type<int32_t>([](size_t v) { return (v % 2 == 0 ? v : -v) * 3; }, [](size_t v) { return v * 2; });
     test_merge_by_type<float64_t>([](size_t v) { return float64_t(v); }, [](size_t v) { return float64_t(v - 100); });
 
-#if !_PSTL_ICC_16_17_TEST_64_TIMEOUT
+#if !defined(_PSTL_ICC_16_17_TEST_64_TIMEOUT)
     test_merge_by_type<Wrapper<int16_t>>([](size_t v) { return Wrapper<int16_t>(v % 100); },
                                          [](size_t v) { return Wrapper<int16_t>(v % 10); });
 #endif

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
index a21c2231c6663..692907e0f92e2 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct run_copy_if
 {
-#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration
+#if defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN) // dummy specializations to skip testing in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size,
               typename Predicate, typename T>
     void
@@ -132,11 +132,11 @@ main()
     test<int32_t>(-666, [](const int32_t& x) { return x != 42; },
                   [](size_t j) { return ((j + 1) % 5 & 2) != 0 ? int32_t(j + 1) : 42; });
 
-#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
+#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
     test<Number>(Number(42, OddTag()), IsMultiple(3, OddTag()), [](int32_t j) { return Number(j, OddTag()); });
 #endif
 
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
     test<int32_t>(-666, [](const int32_t&) { return true; }, [](size_t j) { return j; }, false);
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
index 844606f119f37..bd6b259c4d0af 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
@@ -21,7 +21,7 @@ using namespace TestUtils;
 struct test_one_policy
 {
     //dummy specialization by policy type, in case of broken configuration
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) || defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN)
 
     template <typename Iterator1, typename Predicate>
     void
@@ -90,7 +90,7 @@ main()
     test<float64_t>([](const float64_t x) { return x < 0; });
     test<int32_t>([](const int32_t x) { return x > 1000; });
     test<uint16_t>([](const uint16_t x) { return x % 5 < 3; });
-#if !_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN && !_PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN) && !defined(_PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN)
     test<LocalWrapper<float64_t>>([](const LocalWrapper<float64_t>&) { return true; });
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
index 159c9bf5bdab8..724f0ba6d3f4d 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
@@ -64,8 +64,8 @@ typename std::enable_if<!std::is_trivial<typename std::iterator_traits<Iterator>
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specializations to skip testing in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specializations to skip testing in case of broken configuration
     template <typename BiDirIt, typename Size, typename UnaryOp, typename Generator>
     void
     operator()(pstl::execution::unsequenced_policy, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last,
@@ -79,7 +79,7 @@ struct test_one_policy
                BiDirIt exp_last, Size n, UnaryOp unary_op, Generator generator)
     {
     }
-#elif _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specializations to skip testing in case of broken configuration
+#elif defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN) //dummy specializations to skip testing in case of broken configuration
     template <typename BiDirIt, typename Size, typename UnaryOp, typename Generator>
     void
     operator()(pstl::execution::parallel_policy, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last,
@@ -163,7 +163,7 @@ struct test_non_const
 int
 main()
 {
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
     test_by_type<int32_t>([](int32_t i) { return i; }, [](int32_t) { return true; });
 #endif
     test_by_type<float64_t>([](int32_t i) { return -i; }, [](const float64_t x) { return x < 0; });

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
index 29e7aa578a2ed..c621f8352f1dc 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
@@ -40,7 +40,7 @@ struct test_partition_copy
     }
 
     //dummy specialization by iterator type and policy type, in case of broken configuration
-#if _PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN
+#if defined(_PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN)
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename UnaryOp>
     void
     operator()(pstl::execution::unsequenced_policy, std::reverse_iterator<InputIterator> first,
@@ -102,7 +102,7 @@ main()
 {
     test<int32_t>([](const int32_t value) { return value % 2; });
 
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
     test<int32_t>([](const int32_t) { return true; });
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
index d2a6079f4407c..126454fd7272e 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
@@ -21,8 +21,8 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN || _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||       \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN) || defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||       \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Iterator2>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b,
@@ -95,7 +95,7 @@ main()
     test<int32_t>();
     test<uint16_t>();
     test<float64_t>();
-#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
+#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
     test<wrapper<float64_t>>();
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
index b7358ce7f7b95..75d72fb614296 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
@@ -61,8 +61,8 @@ struct test_one_policy
     Iterator data_e;
     test_one_policy(Iterator b, Iterator e) : data_b(b), data_e(e) {}
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator1 actual_b, Iterator1 actual_e)

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
index 5fe195e575082..24b784383916e 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
@@ -22,8 +22,8 @@ using namespace TestUtils;
 struct run_copy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size, typename T>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -74,8 +74,8 @@ template <typename T>
 struct run_move
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -116,8 +116,8 @@ template <typename T>
 struct run_move<Wrapper<T>>
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -188,7 +188,7 @@ main()
     test<int32_t>(-666, [](size_t j) { return int32_t(j); });
     test<Wrapper<float64_t>>(Wrapper<float64_t>(-666.0), [](int32_t j) { return Wrapper<float64_t>(j); });
 
-#if !_PSTL_ICC_16_17_TEST_64_TIMEOUT
+#if !defined(_PSTL_ICC_16_17_TEST_64_TIMEOUT)
     test<float64_t>(-666.0, [](size_t j) { return float64_t(j); });
     test<Number>(Number(42, OddTag()), [](int32_t j) { return Number(j, OddTag()); });
 #endif

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
index 5bb3cf2ca7597..872b0d292caa7 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
@@ -21,8 +21,8 @@ using namespace TestUtils;
 
 struct run_remove
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename Size, typename T>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -59,8 +59,8 @@ struct run_remove
 
 struct run_remove_if
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename Size, typename Predicate>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -133,7 +133,7 @@ struct test_non_const
 int
 main()
 {
-#if !_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN)
     test<int32_t>(666, 42, [](int32_t) { return true; }, [](size_t j) { return j; });
 #endif
 
@@ -142,7 +142,7 @@ main()
     test<float64_t>(-666.0, 8.5, [](const float64_t& val) { return val != 8.5; },
                     [](size_t j) { return ((j + 1) % 7 & 2) != 0 ? 8.5 : float64_t(j % 32 + j); });
 
-#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
+#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
     test<Number>(Number(-666, OddTag()), Number(42, OddTag()), IsMultiple(3, OddTag()),
                  [](int32_t j) { return Number(j, OddTag()); });
 #endif

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
index 0ebff672b0979..94d725fb1c500 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
@@ -93,7 +93,7 @@ main()
     test<int32_t>(-666, 42, 99, [](const int32_t& x) { return x != 42; },
                   [](size_t j) { return ((j + 1) % 5 & 2) != 0 ? 42 : -1 - int32_t(j); });
 
-#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
+#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
     test<Number>(Number(42, OddTag()), Number(2001, OddTag()), Number(2017, OddTag()), IsMultiple(3, OddTag()),
                  [](int32_t j) { return ((j + 1) % 3 & 2) != 0 ? Number(2001, OddTag()) : Number(j, OddTag()); });
 #endif

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
index 5402f792dfb2c..0d1cfeb4ae8e3 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
@@ -74,8 +74,8 @@ struct compare<wrapper<T>>
 struct test_one_policy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specializations to skip testing in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specializations to skip testing in case of broken configuration
     template <typename Iterator, typename Size>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator data_b, Iterator data_e, Iterator actual_b,

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
index b18fd0ea60c55..539cefc929d45 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
@@ -69,8 +69,8 @@ struct comparator
 struct test_one_policy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Iterator2>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b,

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
index b33bb80c4304a..fbd4742b7e457 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
@@ -21,8 +21,8 @@ using namespace TestUtils;
 
 struct run_unique
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename ForwardIt, typename Generator>
     void
     operator()(pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2,
@@ -139,7 +139,7 @@ struct test_non_const
 int
 main()
 {
-#if !_PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN)
     test<int32_t>([](size_t j) { return j / 3; },
                   [](const int32_t& val1, const int32_t& val2) { return val1 * val1 == val2 * val2; });
     test<float64_t>([](size_t) { return float64_t(1); },

diff  --git a/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp b/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
index e61a448be41d2..356d4d24aba67 100644
--- a/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct run_unique_copy
 {
-#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration
+#if defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN) // dummy specializations to skip testing in case of broken configuration
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size,
               typename Predicate, typename T>
     void
@@ -123,7 +123,7 @@ main()
 
     test<float32_t>(float32_t(42), std::equal_to<float32_t>(),
                     [](int32_t j) { return float32_t(5 * j / 23 ^ (j / 7)); });
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
     test<float32_t>(float32_t(42), [](float32_t, float32_t) { return false; }, [](int32_t j) { return float32_t(j); },
                     false);
 #endif

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
index fb5e78c266e1f..ec23dc47e2f94 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
@@ -106,7 +106,7 @@ main()
     test<int32_t>(8 * sizeof(int32_t));
     test<uint16_t>(8 * sizeof(uint16_t));
     test<float64_t>(53);
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>(1);
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
index 82e8975c344fe..97d1691fa34ee 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
@@ -92,7 +92,7 @@ main()
     test<int32_t>(8 * sizeof(int32_t));
     test<uint16_t>(8 * sizeof(uint16_t));
     test<float64_t>(53);
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>(1);
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
index 68f557d673347..e8eca023d15ae 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
@@ -94,7 +94,7 @@ int
 main()
 {
     test<int32_t>(42, IsEqual<int32_t>(50, OddTag()), [](int32_t j) { return j; });
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
     test<int32_t>(42, [](const int32_t&) { return true; }, [](int32_t j) { return j; });
 #endif
     test<float64_t>(42, IsEqual<float64_t>(50, OddTag()), [](int32_t j) { return float64_t(j); });

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
index a7ac2397e63b9..a6983eae2ff18 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
@@ -156,7 +156,7 @@ main()
     test<int32_t>(8 * sizeof(int32_t));
     test<uint16_t>(8 * sizeof(uint16_t));
     test<float64_t>(53);
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>(1);
 #endif
     test<UserType>(256);

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
index f09b240603987..54b25c27ea2fb 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
@@ -21,8 +21,8 @@ using namespace TestUtils;
 
 struct test_find
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator, typename Value>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Value value)

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
index 1e07a96003a5c..ed0185f7b0c5e 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
@@ -20,8 +20,8 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Iterator2, typename Predicate>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator1 b, Iterator1 e, Iterator2 bsub, Iterator2 esub,
@@ -112,7 +112,7 @@ main()
     test<int32_t>(8 * sizeof(int32_t));
     test<uint16_t>(8 * sizeof(uint16_t));
     test<float64_t>(53);
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>(1);
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
index d2f47d046278e..5b4801e9b3a87 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
@@ -20,8 +20,8 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Iterator2, typename Predicate>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator1 b, Iterator1 e, Iterator2 bsub, Iterator2 esub,

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
index 0a9e3aacc704f..180d003996dda 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
@@ -21,8 +21,8 @@ using namespace TestUtils;
 
 struct test_find_if
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator, typename Predicate, typename NotPredicate>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Predicate pred,
@@ -92,7 +92,7 @@ struct test_non_const
 int
 main()
 {
-#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
+#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
     // Note that the "hit" and "miss" functions here avoid overflow issues.
     test<Number>(IsMultiple(5, OddTag()), [](int32_t j) { return Number(j - j % 5, OddTag()); }, // hit
                  [](int32_t j) { return Number(j % 5 == 0 ? j ^ 1 : j, OddTag()); });            // miss

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
index 772c42e536f9e..dbdcd54438c43 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
@@ -90,7 +90,7 @@ main()
     test<int32_t>(8 * sizeof(int32_t));
     test<uint16_t>(8 * sizeof(uint16_t));
     test<float64_t>(53);
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>(1);
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
index cf87085ef2139..f3e43da39a3a9 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
@@ -68,8 +68,8 @@ is_equal(const T& x, const T& y)
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Size, typename Generator1, typename Generator2, typename Compare>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator1 first1, Iterator1 last1, Iterator1 first2,

diff  --git a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
index d009df919a301..573f364edef21 100644
--- a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
@@ -20,8 +20,8 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator, typename Size, typename T, typename Predicate>
     void
     operator()(pstl::execution::unsequenced_policy, Iterator b, Iterator e, Size count, const T& value, Predicate pred)
@@ -98,7 +98,7 @@ main()
     test<int32_t>();
     test<uint16_t>();
     test<float64_t>();
-#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN)
     test<bool>();
 #endif
 

diff  --git a/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp b/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
index 1fe1823136958..08eca8eed1c52 100644
--- a/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
@@ -35,8 +35,8 @@ struct WithCmpOp
 
 struct test_is_heap
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator, typename Predicate>
     typename std::enable_if<is_same_iterator_category<Iterator, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Predicate pred)

diff  --git a/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp b/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
index 595c53276f7b5..cb920574ba353 100644
--- a/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
@@ -161,7 +161,7 @@ main()
 {
     test<uint16_t, float64_t>(std::less<float64_t>());
     test<float32_t, int32_t>(std::greater<float32_t>());
-#if !_PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN)
     test<float64_t, int32_t>([](const float64_t x, const int32_t y) { return x * x < y * y; });
 #endif
     test<LocalWrapper<int32_t>, LocalWrapper<int32_t>>(

diff  --git a/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp b/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
index 43afee0bad300..9090f89e43616 100644
--- a/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
@@ -55,8 +55,8 @@ struct test_one_policy
         : d_first(b1), d_last(e1), exp_first(b2), exp_last(e2)
     {
     }
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename InputIterator, typename Size, typename T, typename Compare>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, Size n1, Size n2,

diff  --git a/pstl/test/std/numerics/numeric.ops/adjacent_
diff erence.pass.cpp b/pstl/test/std/numerics/numeric.ops/adjacent_
diff erence.pass.cpp
index d96da21f0cce9..8e56f61c0ccba 100644
--- a/pstl/test/std/numerics/numeric.ops/adjacent_
diff erence.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/adjacent_
diff erence.pass.cpp
@@ -94,8 +94,8 @@ typename std::enable_if<std::is_floating_point<T>::value, bool>::type compute_an
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
-    _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) ||                                                             \
+    defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
     template <typename Iterator1, typename Iterator2, typename T, typename Function>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
     operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b,

diff  --git a/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp b/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
index b8c4598f9a278..b2144b96f5ddb 100644
--- a/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
@@ -54,7 +54,7 @@ test_long_form(T init, BinaryOp binary_op, F f)
 struct test_two_short_forms
 {
 
-#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specialization by policy type, in case of broken configuration
+#if defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN) //dummy specialization by policy type, in case of broken configuration
     template <typename Iterator>
     void
     operator()(pstl::execution::parallel_policy, Iterator first, Iterator last, Sum init, Sum expected)

diff  --git a/pstl/test/std/numerics/numeric.ops/scan.pass.cpp b/pstl/test/std/numerics/numeric.ops/scan.pass.cpp
index b9eef530f5f59..e89edc71a2dd0 100644
--- a/pstl/test/std/numerics/numeric.ops/scan.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/scan.pass.cpp
@@ -185,7 +185,7 @@ main()
     for (int32_t mode = 0; mode < 2; ++mode)
     {
         inclusive = mode != 0;
-#if !_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN)
         // Test with highly restricted type and associative but not commutative operation
         test_matrix<Matrix2x2<int32_t>, Matrix2x2<int32_t>>(Matrix2x2<int32_t>(), multiply_matrix<int32_t>,
                                                             Matrix2x2<int32_t>(-666, 666));

diff  --git a/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp b/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
index 1c9b470aa052d..95294e43c4c1d 100644
--- a/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
+++ b/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
@@ -165,7 +165,7 @@ main()
     for (int32_t mode = 0; mode < 2; ++mode)
     {
         inclusive = mode != 0;
-#if !_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN
+#if !defined(_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN)
         test_matrix<Matrix2x2<int32_t>, Matrix2x2<int32_t>>([](const Matrix2x2<int32_t> x) { return x; },
                                                             Matrix2x2<int32_t>(), multiply_matrix<int32_t>,
                                                             Matrix2x2<int32_t>(-666, 666));

diff  --git a/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
index 23c76130bd624..a5bdbb3a9c7e1 100644
--- a/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
+++ b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
@@ -109,7 +109,7 @@ main()
 {
 
     // for user-defined types
-#if !_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN)
     test_uninit_construct_by_type<Wrapper<int32_t>>();
     test_uninit_construct_by_type<Wrapper<std::vector<std::string>>>();
 #endif

diff  --git a/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
index 718be4e1e772c..21186b41ee139 100644
--- a/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
+++ b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
@@ -73,7 +73,7 @@ struct test_uninitialized_copy_move
         std::destroy_n(exec, out_first, n);
     }
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN
+#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) || defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN)
     template <typename InputIterator, typename OutputIterator>
     void
     operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first,
@@ -133,8 +133,8 @@ main()
     test_uninitialized_copy_move_by_type<float64_t>();
 
     // for user-defined types
-#if !_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN && !_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN &&     \
-    !_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN
+#if !defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) && !defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) &&     \
+    !defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN)
     test_uninitialized_copy_move_by_type<Wrapper<int8_t>>();
 #endif
 

diff  --git a/pstl/test/support/utils.h b/pstl/test/support/utils.h
index 090f9377cece0..d223204849176 100644
--- a/pstl/test/support/utils.h
+++ b/pstl/test/support/utils.h
@@ -648,7 +648,7 @@ struct Matrix2x2
     T a[2][2];
     Matrix2x2() : a{{1, 0}, {0, 1}} {}
     Matrix2x2(T x, T y) : a{{0, x}, {x, y}} {}
-#if !_PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN
+#if !defined(_PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN)
     Matrix2x2(const Matrix2x2& m) : a{{m.a[0][0], m.a[0][1]}, {m.a[1][0], m.a[1][1]}} {}
     Matrix2x2&
     operator=(const Matrix2x2& m)
@@ -727,7 +727,7 @@ struct ReverseAdapter
     iterator_type
     operator()(Iterator it)
     {
-#if _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT
+#if defined(_PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT)
         return std::make_reverse_iterator(it);
 #else
         return iterator_type(it);
@@ -1267,7 +1267,7 @@ transform_reduce_serial(InputIterator first, InputIterator last, T init, BinaryO
 static const char*
 done()
 {
-#if _PSTL_TEST_SUCCESSFUL_KEYWORD
+#if defined(_PSTL_TEST_SUCCESSFUL_KEYWORD)
     return "done";
 #else
     return "passed";
@@ -1304,7 +1304,7 @@ template <typename Policy, typename F>
 static void
 invoke_if(Policy&&, F f)
 {
-#if _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN
+#if defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) || defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN)
     __pstl::__internal::invoke_if_not(__pstl::__internal::allow_unsequenced<Policy>(), f);
 #else
     f();


        


More information about the libcxx-commits mailing list