Skip to content

Commit 1c758ac

Browse files
committed
[SYCL] Adjust deprecation warning
1 parent 2fdcacf commit 1c758ac

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

sycl/include/CL/sycl/detail/defines_elementary.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@
4040

4141
#ifndef __SYCL_DEPRECATED
4242
#ifndef SYCL_DISABLE_DEPRECATION_WARNINGS
43-
#ifdef _WIN32
44-
#define __SYCL_DEPRECATED(message) __declspec(deprecated(message))
45-
#else
46-
#define __SYCL_DEPRECATED(message) __attribute__((deprecated(message)))
47-
#endif
43+
#define __SYCL_DEPRECATED(message) [[deprecated(message)]]
4844
#else // SYCL_DISABLE_DEPRECATION_WARNINGS
4945
#define __SYCL_DEPRECATED(message)
5046
#endif // SYCL_DISABLE_DEPRECATION_WARNINGS

sycl/include/CL/sycl/kernel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ class __SYCL_EXPORT kernel {
153153
/// \return depends on information being queried.
154154
template <info::kernel_sub_group param>
155155
// clang-format off
156-
typename info::param_traits<info::kernel_sub_group, param>::return_type
157156
__SYCL_DEPRECATED("Use get_info with info::kernel_device_specific instead.")
157+
typename info::param_traits<info::kernel_sub_group, param>::return_type
158158
get_sub_group_info(const device &Device) const;
159159
// clang-format on
160160

@@ -166,8 +166,8 @@ class __SYCL_EXPORT kernel {
166166
/// \return depends on information being queried.
167167
template <info::kernel_sub_group param>
168168
// clang-format off
169-
typename info::param_traits<info::kernel_sub_group, param>::return_type
170169
__SYCL_DEPRECATED("Use get_info with info::kernel_device_specific instead.")
170+
typename info::param_traits<info::kernel_sub_group, param>::return_type
171171
get_sub_group_info(const device &Device,
172172
typename info::param_traits<info::kernel_sub_group,
173173
param>::input_type Value) const;

sycl/include/CL/sycl/properties/accessor_properties.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class __SYCL2020_DEPRECATED("spelling is now: no_init") noinit
2828

2929
__SYCL_INLINE_CONSTEXPR property::no_init no_init;
3030

31-
__SYCL_INLINE_CONSTEXPR property::noinit
32-
__SYCL2020_DEPRECATED("spelling is now: no_init") noinit;
31+
__SYCL2020_DEPRECATED("spelling is now: no_init")
32+
__SYCL_INLINE_CONSTEXPR property::noinit noinit;
3333

3434
#else
3535

sycl/unittests/get_native_interop/test_get_native.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11+
#define SYCL2020_DISABLE_DEPRECATION_WARNINGS
12+
1113
#include <CL/sycl.hpp>
1214
#include <CL/sycl/backend/opencl.hpp>
1315
#include <detail/context_impl.hpp>

0 commit comments

Comments
 (0)