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

fix for MSVC2019 going bonkers about the various struct active #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GerHobbelt
Copy link

fix for MSVC2019 going bonkers about the various struct active in the tests mixing them up in monolithic builds:

by placing each within its own namespace do we prevent this confusion.

(NOT CHECKED ASSUMPTION: probably due to the MSVC2019 compiler being configured to compile at link time in my projects, but that's just a hunch. Fact is the /RTC1 debug mode checks built in by the compiler fire up in multiple places about corruption "around the variable m" which is a struct active instance in several tests. Having those structs in a namespace and then using the test-specific namespace in that test resolves this compiler issue.)


Postscript:

Included this patch with the other pull reqs FYI; this one is rather niche as it only becomes an issue when you merge all those test programs together into a single one and compile it into a single binary (hence "monolithic build").

Reject & close if you don't like it, no sweat.

(cherrypicked off https://github.com/GerHobbelt/clipp master branch; original commit tested with latest MSVC2019)

…he tests mixing them up in monolithic builds: by placing each within its own namespace do we prevent this confusion. (NOT CHECKED ASSUMPTION: probably due to the MSVC2019 compiler being configured to compile at link time in my projects, but that's just a hunch. Fact is the RTL/I debug mode mode checks built in by the compiler fire up in multiple places about corruption "around the variable m" which is a `struct active` instance in several tests. Having those structs in a namespace and then using the test-specific namespace in *that* test resolves this compiler issue.
@GerHobbelt GerHobbelt changed the title fix for MSVC2019 going bonkers about the various struct active in t… fix for MSVC2019 going bonkers about the various struct active Jun 17, 2021
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

Successfully merging this pull request may close these issues.

None yet

1 participant