Unused Code: A Hidden Time Bomb
• SEI Report
Publisher
Software Engineering Institute
DOI (Digital Object Identifier)
10.1184/R1/32578797Topic or Tag
Abstract
Dead, unused, or unreachable code remains a safety, reliability, and assurance concern in C/C++ and other common programming languages. This code can hide logic defects, expand security attack surfaces, and undermine certification evidence when structural code coverage is required. This paper summarizes why the issue matters, discusses real-world examples, and describes how it can be detected and prevented through standards, analysis, and process controls. The paper also provides a summary of how languages other than C and C++ – including Java, Rust, and Python – detect or prevent forms of unreachable and dead code at compile time and through tooling.
Cite This SEI Report
Serafini, K., Beck, S., Plakosh, D., Popowski, J., & Robert, J. (2026, June 5). Unused Code: A Hidden Time Bomb. Retrieved June 6, 2026, from https://doi.org/10.1184/R1/32578797.
@techreport{serafini_2026,
author={Serafini, Kevin and Beck, Stephen and Plakosh, Daniel and Popowski, Jason and Robert, John},
title={Unused Code: A Hidden Time Bomb},
month={{Jun},
year={{2026},
howpublished={Carnegie Mellon University, Software Engineering Institute's Digital Library},
url={https://doi.org/10.1184/R1/32578797},
note={Accessed: 2026-Jun-6}
}
Serafini, Kevin, Stephen Beck, Daniel Plakosh, Jason Popowski, and John Robert. "Unused Code: A Hidden Time Bomb." Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, June 5, 2026. https://doi.org/10.1184/R1/32578797.
K. Serafini, S. Beck, D. Plakosh, J. Popowski, and J. Robert, "Unused Code: A Hidden Time Bomb," Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, 5-Jun-2026 [Online]. Available: https://doi.org/10.1184/R1/32578797. [Accessed: 6-Jun-2026].
Serafini, Kevin, Stephen Beck, Daniel Plakosh, Jason Popowski, and John Robert. "Unused Code: A Hidden Time Bomb." Carnegie Mellon University, Software Engineering Institute's Digital Library, Software Engineering Institute, 5 Jun. 2026. https://doi.org/10.1184/R1/32578797. Accessed 6 Jun. 2026.
Serafini, Kevin; Beck, Stephen; Plakosh, Daniel; Popowski, Jason; & Robert, John. Unused Code: A Hidden Time Bomb. Software Engineering Institute. 2026. https://doi.org/10.1184/R1/32578797