We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
utilities/parallel_utils.h makes use of C VLAs in at least 6 places, as outputted by GCC 13.2.1.
utilities/parallel_utils.h
An expedient solution would be to replace VLAs with std::vector.
std::vector
In file included from src/NGen.cpp:51: include/utilities/parallel_utils.h: In function ‘void parallel::get_hosts_array(int, int, int*)’: include/utilities/parallel_utils.h:161:13: error: ISO C++ forbids variable length array ‘actualHostnameCStrLength’ [-Wvla] 161 | int actualHostnameCStrLength[mpi_num_procs]; | ^~~~~~~~~~~~~~~~~~~~~~~~ include/utilities/parallel_utils.h:178:13: error: ISO C++ forbids variable length array ‘recvDisplacements’ [-Wvla] 178 | int recvDisplacements[mpi_num_procs]; | ^~~~~~~~~~~~~~~~~ include/utilities/parallel_utils.h:190:14: error: ISO C++ forbids variable length array ‘hostnames’ [-Wvla] 190 | char hostnames[totalLength]; | ^~~~~~~~~ include/utilities/parallel_utils.h: In function ‘bool parallel::mpi_send_text_file(const char*, int, int)’: include/utilities/parallel_utils.h:243:14: error: ISO C++ forbids variable length array ‘buf’ [-Wvla] 243 | char buf[bufSize]; | ^~~ include/utilities/parallel_utils.h: In function ‘bool parallel::mpi_recv_text_file(const char*, int, int)’: include/utilities/parallel_utils.h:332:14: error: ISO C++ forbids variable length array ‘buf’ [-Wvla] 332 | char buf[bufSize]; | ^~~ include/utilities/parallel_utils.h: In function ‘bool parallel::subdivide_hydrofabric(int, int, const std::string&, const std::string&, const std::string&)’: include/utilities/parallel_utils.h:525:17: error: ISO C++ forbids variable length array ‘hostIdForRank’ [-Wvla] 525 | int hostIdForRank[mpi_num_procs]; | ^~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
pedantic: replace use of VLAs with std::vector (NOAA-OWP#784)
06d627a
pedantic: replace use of VLAs with std::vector (#784)
dd3b91b
Successfully merging a pull request may close this issue.
utilities/parallel_utils.h
makes use of C VLAs in at least 6 places, as outputted by GCC 13.2.1.An expedient solution would be to replace VLAs with
std::vector
.The text was updated successfully, but these errors were encountered: