Which version of the compiler are you using? MSVS has had this bug numerous times in various versions.
VisualStudio 2008 : version 9.307... (SP) . See the attached file for precise version info.
In the mean time, I also tried to look at the '.i' file, i.e., the intermediate file generated by the preprocessor. It contains about half a million lines !
The disassembled code seems weird (a whole bunch of assembler code right before the opening bracket) :
Code:
void myClass::myFunction(int mode) // virtual member function
00681FB0 push ebp
00681FB1 mov ebp,esp
00681FB3 push 0FFFFFFFFh
00681FB5 push offset __ehhandler$?TraceRays@PanthereV2@@UAEXH@Z (98D1D6h)
00681FBA mov eax,dword ptr fs:[00000000h]
00681FC0 push eax
00681FC1 sub esp,1ECh
00681FC7 push esi
00681FC8 push edi
00681FC9 push ecx
00681FCA lea edi,[ebp-1F8h]
00681FD0 mov ecx,7Bh
00681FD5 mov eax,0CCCCCCCCh
00681FDA rep stos dword ptr es:[edi]
00681FDC pop ecx
00681FDD mov eax,dword ptr [___security_cookie (0AF4AF0h)]
00681FE2 xor eax,ebp
00681FE4 mov dword ptr [ebp-10h],eax
00681FE7 push eax
00681FE8 lea eax,[ebp-0Ch]
00681FEB mov dword ptr fs:[00000000h],eax
00681FF1 mov dword ptr [ebp-14h],ecx
{