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

New MSVC warning in cl::copy #293

Open
MathiasMagnus opened this issue May 14, 2024 · 2 comments
Open

New MSVC warning in cl::copy #293

MathiasMagnus opened this issue May 14, 2024 · 2 comments

Comments

@MathiasMagnus
Copy link
Contributor

Previously MSVC threw a warning for using naked pointers with algorithms in Debug builds without using a vendor utility promising that the pointers are valid over a certain range. Latest VS deprecated this feature and now it issues a deprecation warning.

D:\Develop\GPGPU1\build\msbuild-msvc\_deps\opencl-sdk-src\external\OpenCL-CLHPP\include\CL\opencl.hpp(10031,50): warning C4996: 'stdext::checked_array_iterator<DataType *>::checked_array_iterator': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning. [D:\Develop\GPGPU1\build\msbuild-msvc\OpenCL\C++-API\SAXPY\OpenCL-Cpp-SAXPY.vcxproj]
@Kerilk
Copy link
Contributor

Kerilk commented Oct 1, 2024

This is breaking the CI:
Here are the offending code lines:

#if defined(_MSC_VER)
std::copy(
startIterator,
endIterator,
stdext::checked_array_iterator<DataType*>(
pointer, length));
#else
std::copy(startIterator, endIterator, pointer);
#endif

@bashbaug
Copy link
Contributor

bashbaug commented Oct 3, 2024

#309 might fix this issue.

I don't have easy access to all versions of visual studio to test, but this at least "fixes" our CI failures.

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

3 participants