Remove global optimizations for SHA1ProcessMessageBlock() #2293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently noticed that save files from my Debug builds in Visual Studio 2022 were incompatible with my Release builds and vice-versa. I tracked it down to the Global Optimizations flag (
/Og
) in the compiler, which is included in the list of optimizations turned on by both/O1
and/O2
.My version of MSVC in VS2022 is
_MSC_VER == 1939
. I figured this was caused by a fairly recent change in MSVC so I tested in VS2019_MSC_VER == 1929
as well. The optimization works fine in VS2019 so in lieu of trying to install and test every version of VS2022 to narrow it down further, I just disabled the optimization for this one function for all versions of VS2022.