Skip to content
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

sub-group warning: variable length arrays in C++ are a Clang extension #848

Open
AlexeySachkov opened this issue Jan 9, 2024 · 0 comments

Comments

@AlexeySachkov
Copy link
Contributor

TEST_CASE("Check sycl::sub_group equality", "[sub_group]") {
size_t code_count =
to_integral(common_by_value_semantics::current_check::size);
bool result[code_count];

Build log:

[649/1195] Building CXX object tests/sub_group/CMakeFiles/test_sub_group_objects.dir/sub_group_semantics.cpp.o
../tests/sub_group/sub_group_semantics.cpp:123:15: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
  123 |   bool result[code_count];
      |               ^~~~~~~~~~
../tests/sub_group/sub_group_semantics.cpp:123:15: note: read of non-const variable 'code_count' is not allowed in a constant expression
../tests/sub_group/sub_group_semantics.cpp:121:10: note: declared here
  121 |   size_t code_count =
      |          ^
1 warning generated.
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

No branches or pull requests

1 participant