Skip to content

[SYCL] Return support for compilation with C++14 back #3802

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 4 commits into from
May 27, 2021

Conversation

romanovvlad
Copy link
Contributor

The patch enables ability to compile a SYCL application that doesn't use certain
features (sycl::span, SYCL2020 specialization constants) with -std=c++14 option
by guarding code which uses C++17 feature with macro.

@romanovvlad romanovvlad requested a review from a team as a code owner May 23, 2021 14:33
@romanovvlad romanovvlad requested review from s-kanaev and pvchupin May 23, 2021 14:33
@romanovvlad
Copy link
Contributor Author

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

s-kanaev
s-kanaev previously approved these changes May 24, 2021
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bader
Copy link
Contributor

bader commented May 25, 2021

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

Please, add a warning and fix pre-commit failures.

@romanovvlad
Copy link
Contributor Author

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

Hm, not sure how to add a warning message in headers. Pragma warning is not reported as SYCL headers are considered as system ones. Any thoughts? Should we do this in the driver?

@romanovvlad romanovvlad requested a review from s-kanaev May 26, 2021 16:47
@romanovvlad romanovvlad requested a review from s-kanaev May 27, 2021 14:32
@romanovvlad romanovvlad merged commit e5af883 into intel:sycl May 27, 2021
@bader
Copy link
Contributor

bader commented May 29, 2021

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

Hm, not sure how to add a warning message in headers. Pragma warning is not reported as SYCL headers are considered as system ones. Any thoughts? Should we do this in the driver?

+@AaronBallman
Maybe there is a way to emit a non-warning message from system headers?

@AaronBallman
Copy link
Contributor

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

Hm, not sure how to add a warning message in headers. Pragma warning is not reported as SYCL headers are considered as system ones. Any thoughts? Should we do this in the driver?

+@AaronBallman
Maybe there is a way to emit a non-warning message from system headers?

Some compilers support #warning and will produce the message even in a system header: https://godbolt.org/z/Yj7hsxjsv

@romanovvlad
Copy link
Contributor Author

Probably it would be nice to add a warning saying that some features are disabled in case of compilation with c++14

Hm, not sure how to add a warning message in headers. Pragma warning is not reported as SYCL headers are considered as system ones. Any thoughts? Should we do this in the driver?

+@AaronBallman
Maybe there is a way to emit a non-warning message from system headers?

Some compilers support #warning and will produce the message even in a system header: https://godbolt.org/z/Yj7hsxjsv

Trying to add a warning here: #4303 (comment)

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.

4 participants