Skip to content

Use [[deprecated("msg")]] annotation only for C++ builds #897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 4, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

Changed libsyclinterface/include/dpctl_sycl_device_interface.h to only use [[deprecated("msg")]] annotation for C++ builds.

This fixes build of numba-dpex's native extension. This remained broken despite claim to the contrary in #879.

  • Have you provided a meaningful PR description?

@mingjie-intel

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

@coveralls
Copy link
Collaborator

coveralls commented Sep 3, 2022

Coverage Status

Coverage remained the same at 81.842% when pulling cbaef17 on use-deprecated-only-for-cpp into 8655e98 on master.

@diptorupd
Copy link
Contributor

LGTM! Please merge.

diptorupd
diptorupd previously approved these changes Sep 4, 2022
@oleksandr-pavlyk
Copy link
Contributor Author

Actually, perhaps the check can be relaxed somewhat. The C extension added in #879 builds fine with gcc 11.2 packaged in conda c compiler package, while It was failing for me locally with gcc 9.4 installed on Ubuntu 20.04.

@oleksandr-pavlyk
Copy link
Contributor Author

[[deprecated]] is part of C23 standard. It is supported in GCC, see https://en.cppreference.com/w/c/23

This explains why it breaks for me on GCC 9.4, but works with Anaconda's compiler which is GCC 11.2

@oleksandr-pavlyk oleksandr-pavlyk merged commit d3ce471 into master Sep 4, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the use-deprecated-only-for-cpp branch September 4, 2022 13:15
@github-actions
Copy link

github-actions bot commented Sep 4, 2022

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants