[ad_1]
I am utilizing the Intel C++ compiler in my Visible Studio 2019 and have encountered a difficulty the place the compiler removes code from capabilities after the return assertion. I disabled all optimizations, nevertheless it nonetheless would not work. Is there a solution to power the compiler to not take away the code?
Right here is the supply code instance:
#outline VM_LION_BLACK_START CustomVM00000165_Start();
#outline VM_LION_BLACK_END CustomVM00000165_End();
VERSIONHELPERAPI
IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor)
{
VM_LION_BLACK_START
OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0, {0}, 0, 0 };
DWORDLONG const dwlConditionMask = VerSetConditionMask(
VerSetConditionMask(
VerSetConditionMask(
0, VER_MAJORVERSION, VER_GREATER_EQUAL),
VER_MINORVERSION, VER_GREATER_EQUAL),
VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL);
osvi.dwMajorVersion = wMajorVersion;
osvi.dwMinorVersion = wMinorVersion;
osvi.wServicePackMajor = wServicePackMajor;
return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
VM_LION_BLACK_END
}
And this can be a decompilation of this operate
As you’ll be able to see, the compiler has eliminated the decision to CustomVM00000165_End()
[ad_2]