GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Compilation error - Wikipedia

Compilation error or compile error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors in the code, or, more unusually, due to errors in the compiler itself. A compilation error message often helps programmers debugging the source code. Although the definitions of compilation and interpretation can be vague, generally compilation errors only refer to static compilation and not dynamic compilation. However, dynamic compilation can still technically have compilation errors, although many programmers and sources may identify them as run-time errors. Most just-in-time compilers, such as the JavaScript V8 engine, ambiguously refer to compilation errors as syntax errors since they check for them at run time.[1][2]

Examples

Common C++ compilation errors

  • Undeclared identifier, e.g.:

doy.cpp: In function `int main()': doy.cpp:25: `DayOfYear' undeclared (first use this function)[3]

This means that the variable "DayOfYear" is trying to be used before being declared.

  • Common function undeclared, e.g.:

xyz.cpp: In function `int main()': xyz.cpp:6: `cout' undeclared (first use this function)[3]

This means that the programmer most likely forgot to include iostream.

  • Parse error, e.g.:

somefile.cpp:24: parse error before `something'[4]

This could mean that a semi-colon is missing at the end of the previous statement.

Internal Compiler Errors

An internal compiler error (commonly abbreviated as ICE) is an error that occurs not due to erroneous source code, but rather due to a bug in the compiler itself. They can sometimes be worked around by making small, insignificant changes to the source code around the line indicated by the error (if such a line is indicated at all),[5] but sometimes larger changes must be made, such as refactoring the code, to avoid certain constructs. Using a different compiler or different version of the compiler may solve the issue and be an acceptable solution in some cases. When an internal compiler error is reached many compilers do not output a standard error, but instead output a shortened version, with additional files attached, which are only provided for internal compiler errors. This is in order to insure that the program doesn't crash when logging the error, which would make solving the error near impossible. The additional files attached for internal compiler errors usually have special formats that they save as, such as .dump for Java. These formats are generally more difficult to analyze than regular files, but can still have very helpful information for solving the bug causing the crash.[6]

Example of an internal compiler error:

somefile.c:1001: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

References

  1. ↑ "Errors | Node.js v7.9.0 Documentation". nodejs.org. Retrieved 2017-04-14.
  2. ↑ "SyntaxError". Mozilla Developer Network. Retrieved 2017-04-14.
  3. 1 2 "Common C++ Compiler and Linker Errors". Archived from the original on 2008-02-16. Retrieved 2008-02-12.
  4. ↑ "Compiler, Linker and Run-Time Errors".
  5. ↑ Cunningham, Ward (2010-03-18). "Compiler Bug". WikiWikiWeb. Retrieved 2017-04-14.
  6. ↑ జగదేశ్. "Analyzing a JVM Crash". Retrieved 2017-04-15.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Compilation_error&oldid=1379644565"
Categories:
  • Debugging
  • Computer errors
Hidden categories:
  • Articles with short description
  • Short description matches Wikidata
  • All articles with unsourced statements
  • Articles with unsourced statements from October 2018
  • All articles lacking reliable references
  • Articles lacking reliable references from February 2019
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.