-
Notifications
You must be signed in to change notification settings - Fork 81
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
Check forbidden kernel constructs in constant evaluated context #976
base: main
Are you sure you want to change the base?
Conversation
0266d6d
to
8f5219d
Compare
There are a lot of restrictions for kernel code, except when present in a constant evaluated context. This is a test corresponding to the specification clarification introduced by PR KhronosGroup/SYCL-Docs#388
8f5219d
to
b3ec4b2
Compare
// through forbidden function pointer which is skipped by the if | ||
// constexpr. | ||
auto* p = f; | ||
auto other = p(5) + f(6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this part does not test a feature used in a manifestly constant evaluated expression.
Rather, I think this is testing that you can use forbidden C++ features in a discarded statement. We did not make this legal in KhronosGroup/SYCL-Docs#388. Potentially, we could consider making this legal, but that would require a separate change to the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have allowed "discarded statements" in KhronosGroup/SYCL-Docs@966a051
(#388)
KhronosGroup/SYCL-Docs#388 was approved to merge. |
There are a lot of restrictions for kernel code, except when present in a constant evaluated context.
This is a test corresponding to the specification clarification introduced by PR KhronosGroup/SYCL-Docs#388