VC++ Internal Compiler Error

倾然丶 夕夏残阳落幕 提交于 2019-11-28 00:54:20

That's a very unfortunate thing. Such indications appear once in a while for no apparent reason. Even MSDN recommends to go to the code and play with optimization pragmas there. You have to detect what construct causes this indication and rewrite it somehow. Or you can use a newer version of VC++.

INTERNAL COMPILER ERROR(compiler file file, line number) The compiler cannot generate correct code for a construct, probably due to the combination of an expression and an optimization option. Try removing one or more optimization options and recompiling the function containing the line indicated in the error message. You can probably fix the problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are /Og, /Oi, and /Oa. Once you determine which option is responsible, you can disable it using the optimize pragma around the function where the error occurs and continue to use the option for the rest of the module. The Microsoft Knowledge Base has more information about C1001; see http://support.microsoft.com/default.aspx?scid=kb;en-us;134650.

Nope, you're screwed. You've done something that exposed an error in the compiler. Play with optimization settings, #pragmas and fiddling with your code until it works.

And perhaps submit a bug report on connect.microsoft.com

The other answers are right, you can try to work around a compiler error, but it is still there. To add, in the meantime Microsoft introduces an automatic error report so that the can know about these errors and might be able to fix them in a future release. The flag is called /errorReport.

See https://docs.microsoft.com/de-de/cpp/build/reference/errorreport-report-internal-compiler-errors?view=vs-2019

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!