B
Ben4212
Guest
I use latest VS. When I compile a release, I started to get strange app behavior. I started to bracket code with #pragma optimize off and on...and I found a solution -- I found one function with switch () {} clause that was completely optimized that when I bracket this function with optimize-skip brackets (where entire code is optimized to the max speed)...the strange behavior is gone.
This is the first time in my career that I debug such an issue that seems almost impossible to believe.
I ask thee if you can relate to this in any way...
#pragma optimize("", off)
void
xxx::yyy(Msg& msg)
{
switch (msg.fCmd) { // 1,2,3,4
case cmd_Exit:
gg->Close();
break;
case cmd_ToggleWin:
gM.Toggle();
break;
case cmd_MinWin:
gg->Show(zum_Min);
break;
case cmd_JumpWin:
gM.Jump();
break;
}
}
#pragma optimize("", on)
Continue reading...
This is the first time in my career that I debug such an issue that seems almost impossible to believe.
I ask thee if you can relate to this in any way...
#pragma optimize("", off)
void
xxx::yyy(Msg& msg)
{
switch (msg.fCmd) { // 1,2,3,4
case cmd_Exit:
gg->Close();
break;
case cmd_ToggleWin:
gM.Toggle();
break;
case cmd_MinWin:
gg->Show(zum_Min);
break;
case cmd_JumpWin:
gM.Jump();
break;
}
}
#pragma optimize("", on)
Continue reading...