Dead code

невыполняемый код, недоступный (недостижимый) участок программы, мёртвый код в программировании - группы (блоки) команд или подпрограммы, к которым никогда не будет обращения, поскольку все соответствующие вызовы были удалены (отсутствуют), или по какой-то иной причине. Такой код, который никогда не будет выполняться независимо от значений переменных или других условий, возникающих во время исполнения программы, обнаруживается компилятором на этапе статического анализа, при помощи графа потоков управления (CFG). Отметим, что в ряде случаев, таких как модификация адреса возврата в стеке, вычисляемые адреса переходов и т. п. блок может быть помечен как недоступный ошибочно Смотри также: code 1), dead code elimination Синоним(ы): unreachable code

Англо-русский словарь компьютерных терминов

Dead code

(Or "infeasible path") Any part of a program that can never be executed because no control flow path leads to it. This may be because it is guarded by a control structure that will always transfer control somewhere else, e.g. if (false) { # dead code } or it may be for a less obvious, less local reason, e.g. code in a function that is only called from another function that is only called to handle certain input that never occurs in practice. Determining that some code is dead may thus require analysis of the whole program. Consideration of possible inputs is probably beyond the normal (static) identification of dead code. The presence of dead code may reveal either logical errors due to alterations in the program or significant changes in the assumptions and environment of the program (see also software rot). Sometimes it simply represents "can't happen" tests inserted by a defensive programmer. A good compiler should warn about dead code or it may perform dead code elimination.

Free Online Dictionary of Computing