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

Tracking issue: enable more MSVC warnings #42767

Closed
GrabYourPitchforks opened this issue Sep 26, 2020 · 1 comment · Fixed by #49194
Closed

Tracking issue: enable more MSVC warnings #42767

GrabYourPitchforks opened this issue Sep 26, 2020 · 1 comment · Fixed by #49194
Assignees
Labels
area-Infrastructure-coreclr help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@GrabYourPitchforks
Copy link
Member

GrabYourPitchforks commented Sep 26, 2020

Initial cost estimate: 1 week
Initial contacts: @trylek, @GrabYourPitchforks, @janvorli

We enable the following warning codes (as error) on some internal runs as part of compliance checks. The warnings are reviewed by hand. The manual reviews always show that we're ok, but it would be nice if we could turn these on as part of the public build. There's a little bit of work involved here to make things compile cleanly. But it would save us the trouble of running through manual review every release.

add_compile_options(/we4018)
add_compile_options(/we4055)
add_compile_options(/we4146)
add_compile_options(/we4242)
add_compile_options(/we4244)
add_compile_options(/we4267)
add_compile_options(/we4302)
add_compile_options(/we4308)
add_compile_options(/we4509)
add_compile_options(/we4510)
add_compile_options(/we4532)
add_compile_options(/we4533)
add_compile_options(/we4610)
add_compile_options(/we4611)
add_compile_options(/we4700)
add_compile_options(/we4701)
add_compile_options(/we4703)
add_compile_options(/we4789)
add_compile_options(/we4995)
add_compile_options(/we4996)
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 26, 2020
@jkotas
Copy link
Member

jkotas commented Sep 26, 2020

We set warning level 3 at

add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W3>) # set warning level to 3
. Majority of the warnings in this list are warning levels 1-3, so they should be enabled by default.

The clrcompression build is one exception that is not using the central setting and disables all warnings: https://github.com/dotnet/runtime/blob/master/src/libraries/Native/Windows/CMakeLists.txt#L4 . Maybe you are seeing this flagged because of that?

@trylek trylek added this to the 6.0.0 milestone Sep 28, 2020
@trylek trylek removed the untriaged New issue has not been triaged by the area owner label Sep 28, 2020
@trylek trylek added the help wanted [up-for-grabs] Good issue for external contributors label Mar 2, 2021
@AaronRobinsonMSFT AaronRobinsonMSFT self-assigned this Mar 5, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 5, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 19, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-coreclr help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants