11-12-2007, 11:42 AM
Unreachable code:
Code is unreachable if the syntax does not permit the code to be accessed.
Infeasible code:
Code is infeasible code if the syntax allows it to be accessed but the semantics ensure that it cannot be reached whatever input data is provided.
Dead code:
Code is dead if it reachable and feasible, but has no effect on the outputs.
This rule is only concerned with Unreachable code.
Defensive code is either unreachable or infeasible.
Code is unreachable if the syntax does not permit the code to be accessed.
Infeasible code:
Code is infeasible code if the syntax allows it to be accessed but the semantics ensure that it cannot be reached whatever input data is provided.
Dead code:
Code is dead if it reachable and feasible, but has no effect on the outputs.
This rule is only concerned with Unreachable code.
Defensive code is either unreachable or infeasible.
Posted by and on behalf of the MISRA C Working Group