致命错误和非致命错误之间的差异 [英] Difference between fatal error and non-fatal error
问题描述
当尝试编译代码时,致命错误和非致命错误在IDE中的主要区别是什么?
What is the main difference between fatal errors and non-fatal errors dipslayed in an IDE when one tries to compile the code?
在这两种情况下,编译器显示错误消息和程序未编译。编译器或链接器中未定义的编译器错误是致命错误吗?
In both cases the compiler shows an error message and the program is not compiled. Are fatal errors the undefined compiler errors in a compiler or linker?
推荐答案
IDE不是编译器。它通常在命令行中启动另一个程序(如 GCC ...)以进行编译。你的IDE只是一个美化的编辑器(在Linux上, emacs
编辑器通常比IDE更好)。
The IDE is not the compiler. It generally starts another program (like GCC...) in command line to compile. Your IDE is simply a glorified editor (and on Linux the emacs
editor is often better than an IDE).
大多数编译器不会给出致命错误,除了编译器错误,在编译时缺少资源,或者源代码输入无法进一步编译:考虑 #include
-ing a不存在的头文件。
Most compilers don't give fatal errors, except on compiler bugs, lacking resources at compile time, or when the source input cannot be further compiled: think of #include
-ing a non existent header file.
BTW,有时编译器会给出这么多错误(例如,试图编译一个英语或法语文学文本伪装成一个C文件)编译意义较少。
BTW, sometimes a compiler gives so many errors (for instance, try to compile an English or French literature text disguised as a C file) that further compilation is meaning less.
这篇关于致命错误和非致命错误之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!