Skip to content

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

Open
GerHobbelt wants to merge 1 commit intomuellan:masterfrom
GerHobbelt:patch-4
Open

fix for MSVC2019 going bonkers about the various struct active#64
GerHobbelt wants to merge 1 commit intomuellan:masterfrom
GerHobbelt:patch-4

Conversation

@GerHobbelt
Copy link
Copy Markdown

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.

1 participant