I was trying to compile our project in Visual Studio 2010 using the 2005 compiler and I stumbled upon this strange bug.
There's this particular file that crashes the compiler whenever I try to compile it from VS2010 with a "Microsoft (R) C/C++ Optimizing Compiler" error dialog with "don't send" buttons. I looked at the way VS2010 invokes 2005's compiler and noticed some differences to the way VS2005 invokes it. So I started deleting those differences one by one while trying to compile after every try, and once I removed the /Gd
flag, the file compiled successfully.
Looking at the compiler docs, this flag controls the calling convention and sets it to __cdecl, which is the default. Only difference is in VS2005 it's omitted but VS2010 decides to add it to the command line, resulting in the crash.
Has anyone encountered this, or knows of a way around this issue? I can't seem to figure out a way to make VS2010 drop /Gd
from the command line, even though it's the default. Only thing I could find is how to add parameters, not remove.
Thanks.