You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenCL 3.0 (and earlier) reserves the ^^ token. However, OpenCL also works with (and encourages use of) the blocks extension, which uses ^ as part of its block expression syntax. This leads to an ambiguity with an immediately called block, as in:
unsigned x=0;
unsigned y=x^^{return 0;}();
This should result in y holding the value zero (0^0) through an immediately invoked block call as the right-hand side of the xor operator. However, it causes errors instead because of this reserved token: https://godbolt.org/z/navf7jTv1
Immediately called blocks (and lambdas) are not uncommon, so perhaps this is a reason to no longer reserve ^^ as a token. Another thing to consider is that WG21 is considering using ^^ as a token for reflection: https://isocpp.org/files/papers/P3381R0.html
Perhaps this token should no longer be reserved in OpenCL?
The text was updated successfully, but these errors were encountered:
OpenCL 3.0 (and earlier) reserves the
^^
token. However, OpenCL also works with (and encourages use of) the blocks extension, which uses^
as part of its block expression syntax. This leads to an ambiguity with an immediately called block, as in:This should result in
y
holding the value zero(0^0)
through an immediately invoked block call as the right-hand side of the xor operator. However, it causes errors instead because of this reserved token: https://godbolt.org/z/navf7jTv1Immediately called blocks (and lambdas) are not uncommon, so perhaps this is a reason to no longer reserve
^^
as a token. Another thing to consider is that WG21 is considering using^^
as a token for reflection: https://isocpp.org/files/papers/P3381R0.htmlPerhaps this token should no longer be reserved in OpenCL?
The text was updated successfully, but these errors were encountered: