Skip to content

[SYCL] Fix deprecation warning for headers #6808

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 1 commit into from
Sep 19, 2022

Conversation

aelovikov-intel
Copy link
Contributor

Using pragmas to emit warnings didn't work because SYCL headers are considered to be system headers and any warnings in them are suppressed.

Use "#warning" instead. Unfortunately, MSVC doesn't support it (although it's part of C23/C++23 and they'll have to add support eventually), so we need some #if guards. Also, #warning cannot be put inside a macro definition, thus we have to have some code duplication. Luckily, entire headers deprecations aren't as often and we can be a little bit verbose.

Using pragmas to emit warnings didn't work because SYCL headers are
considered to be system headers and any warnings in them are suppressed.

Use "#warning" instead. Unfortunately, MSVC doesn't support it (although
it's part of C23/C++23 and they'll have to add support eventually), so
we need some #if guards. Also, #warning cannot be put inside a macro
definition, thus we have to have some code duplication. Luckily, entire
headers deprecations aren't as often and we can be a little bit verbose.
@aelovikov-intel aelovikov-intel marked this pull request as ready for review September 16, 2022 22:10
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner September 16, 2022 22:10
@againull againull merged commit 2cefad1 into intel:sycl Sep 19, 2022
@aelovikov-intel aelovikov-intel deleted the deprecated-headers branch November 8, 2022 20:51
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.

2 participants