Dead code

Some use the term to refer to code (i.e. instructions in memory) which can never be executed at run-time.

While the result of a dead computation may never be used, it may raise exceptions or affect some global state, thus removal of such code may change the output of the program and introduce unintended bugs.

The programmer may aid the compiler in this matter by making additional use of static and/or inline functions and enabling the use of link-time optimization.

Dead-code elimination is a form of compiler optimization in which dead code is removed from a program.

[6] Some IDEs (such as Xcode, Visual Studio 2010[7] and Eclipse Galileo[8]) have the ability to locate dead code during the compiling stage.