-
Notifications
You must be signed in to change notification settings - Fork 124
Raise MSVC warning level from /W3 to /W4 #2100
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
Raise MSVC warning level from /W3 to /W4 #2100
Conversation
4a9f277 to
e8e086b
Compare
|
On GCC, |
I don't think extra warnings being introduced by new compilers is actually an issue, by default warnings are not treated as errors, that's only enabled with the |
6a0b9b3 to
568779e
Compare
c85cdf5 to
1c9da05
Compare
test/conformance/exp_command_buffer/update/buffer_fill_kernel_update.cpp
Show resolved
Hide resolved
1c9da05 to
2dd0821
Compare
2dd0821 to
3186a14
Compare
52f8ebf to
8e2f794
Compare
e7ee380 to
5627f44
Compare
|
@oneapi-src/unified-runtime-cuda-write @oneapi-src/unified-runtime-level-zero-write please review |
5627f44 to
ccbfaa2
Compare
da462e9 to
05f2a1f
Compare
This patch increases the warning level when using the MSVC compiler from `/W3` to `/W4` and fixes the issues found. Four warnings introduced by `/W4` are disabled, all related to variable name shadowing, as they overly prescriptive to valid code.
05f2a1f to
8e56347
Compare
PR oneapi-src#2100 changed the WIN32 check to check from `if(WIN32)` to checking if link.exe is used via `CMAKE_CXX_COMPILER_LINKER_ID`. This has two problems: - CMAKE_CXX_COMPILER_LINKER_ID is only supported starting with CMake 3.29, but UR still claims to CMake versions from 3.20 (`cmake_minimum_required` is called with this version). This results in the flag being silently dropped in earlier versions of CMake. - There are other linkers that also support this flag for example LLD. Using check_linker_flag resolves these issues without hard-coding a list of known linkers.
Revert #2100 "Raise MSVC warning level from /W3 to /W4"
This reinstates the reverted changes in oneapi-src#2100 which were reverted in oneapi-src#2302 due to regressions in intel/llvm testing.
This patch increases the warning level when using the MSVC compiler from
/W3to/W4and fixes the issues found. Four warnings introduced by/W4are disabled, all related to variable name shadowing, as they are overly prescriptive to valid code.intel/llvm#15745