Skip to content

Commit d3ce471

Browse files
Merge pull request #897 from IntelPython/use-deprecated-only-for-cpp
Use [[deprecated("msg")]] annotation only for C++ builds
2 parents 8655e98 + cbaef17 commit d3ce471

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libsyclinterface/include/dpctl_sycl_device_interface.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,11 @@ DPCTLDevice_GetMaxWorkItemSizes3d(__dpctl_keep const DPCTLSyclDeviceRef DRef);
250250
* @return Returns the valid result if device exists else returns NULL.
251251
* @ingroup DeviceInterface
252252
*/
253-
[[deprecated("Use DPCTLDevice_WorkItemSizes3d instead")]] DPCTL_API
254-
__dpctl_keep size_t *
255-
DPCTLDevice_GetMaxWorkItemSizes(__dpctl_keep const DPCTLSyclDeviceRef DRef);
253+
#if __cplusplus || (defined(__GNUC__) && __GNUC__ > 10)
254+
[[deprecated("Use DPCTLDevice_WorkItemSizes3d instead")]]
255+
#endif
256+
DPCTL_API __dpctl_keep size_t *
257+
DPCTLDevice_GetMaxWorkItemSizes(__dpctl_keep const DPCTLSyclDeviceRef DRef);
256258

257259
/*!
258260
* @brief Wrapper for get_info<info::device::max_work_group_size>().

0 commit comments

Comments
 (0)