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

Enable warnings for the benchmarks, and fix them #4356

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

StephanTLavavej
Copy link
Member

Discovered while reviewing #3928, but this has been lurking since the addition of the benchmarks in #2780. No stealth merge conflicts - #3928's new benchmark has been fixed to be warning-clean.

  • Enable warnings when building the benchmarks.
    • Start with the usual: /diagnostics:caret /W4 /WX
    • I'm enabling the same off-by-default warnings as the STL's build (C4265 (non-virtual dtor), C5038 (data member init order)) and adding C5262 (implicit fallthrough).
    • Finally, let's add /utf-8 in case we ever benchmark <format>.
  • Fix x86 size_t truncation warnings in the vector.bool benchmarks.
  • udt.hpp: Rename template parameters from Contained to Data, avoiding REALLY confusing diagnostics.
  • utility.hpp: Silence truncation warnings with a big comment.

* Start with the usual: `/diagnostics:caret /W4 /WX`

* I'm enabling the same off-by-default warnings as the STL's build
  (C4265 (non-virtual dtor), C5038 (data member init order))
  and adding C5262 (implicit fallthrough).

* Finally, let's add `/utf-8` in case we ever benchmark `<format>`.
@StephanTLavavej StephanTLavavej added the test Related to test code label Jan 31, 2024
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner January 31, 2024 11:24
@StephanTLavavej StephanTLavavej self-assigned this Feb 1, 2024
@StephanTLavavej
Copy link
Member Author

I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 55b8971 into microsoft:main Feb 1, 2024
37 checks passed
@StephanTLavavej StephanTLavavej deleted the benchmark-warnings branch February 1, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants