Keith Thompson said:
Is it? Does the "report the problem to Microsoft" message reliably
indicate a bug in Microsoft's compiler, or could it be triggered by a
bug in the program itself? (I have no idea what the answer to that
question is.)
A bit OT, but yes.
Microsoft aren't interested if a developer has introduced a bug into his
program, except that obviously the compiler produces a diagnostic if
possible.
However they are interested if their own compiler / ide / debugger isn't
working. The message indicates that their program has encountered an
internal error, i.e. is bugged. (If it wasn't bugged before it popped up the
message box, it is bugged after).
That bug could be triggered by attempting to compile a legal program, or it
could be triggered by an illegal program. Either way it is Microsoft's
fault.
If it's the result of undefined behavior in the program, recompiling
with another compiler coud very well *seem* to correct the problem.
What I should have asked if whether the message appears at compile time or
run time. If it appears when the program is run under the debugger it is
probably a bug in the debugger rather than the compiler itself. It could
indeed be because the debugger cannot cope with undefined behaviour.
You are right that compiling on another compiler may mask the error. Once
your tool stop working reliably it is hard to know what to do.