Ranged Integers for the C Programming Language
• Technical Note
Publisher
Software Engineering Institute
CMU/SEI Report Number
CMU/SEI-2007-TN-027DOI (Digital Object Identifier)
10.1184/R1/6582830.v1Topic or Tag
Abstract
This report describes an extension to the C programming language to introduce the notion of ranged integers, that is, integer types with a defined range of values. A variable of a ranged integer type will always have a value within the defined range as a result of initialization or assignment. Use of ranged integers would help prevent integer overflow errors and thus would result in more reliable and secure C programs. The syntax and semantics of ranged integers are presented, and some examples are given to illustrate their use.
Cite This Technical Note
Gennari, J., Hedrick, S., Long, F., Pincar, J., & Seacord, R. (2007, September 1). Ranged Integers for the C Programming Language. (Technical Note CMU/SEI-2007-TN-027). Retrieved December 18, 2024, from https://doi.org/10.1184/R1/6582830.v1.
@techreport{gennari_2007,
author={Gennari, Jeff and Hedrick, Shaun and Long, Fred and Pincar, Justin and Seacord, Robert},
title={Ranged Integers for the C Programming Language},
month={{Sep},
year={{2007},
number={{CMU/SEI-2007-TN-027},
howpublished={Carnegie Mellon University, Software Engineering Institute's Digital Library},
url={https://doi.org/10.1184/R1/6582830.v1},
note={Accessed: 2024-Dec-18}
}
Gennari, Jeff, Shaun Hedrick, Fred Long, Justin Pincar, and Robert Seacord. "Ranged Integers for the C Programming Language." (CMU/SEI-2007-TN-027). Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, September 1, 2007. https://doi.org/10.1184/R1/6582830.v1.
J. Gennari, S. Hedrick, F. Long, J. Pincar, and R. Seacord, "Ranged Integers for the C Programming Language," Carnegie Mellon University, Software Engineering Institute's Digital Library. Software Engineering Institute, Technical Note CMU/SEI-2007-TN-027, 1-Sep-2007 [Online]. Available: https://doi.org/10.1184/R1/6582830.v1. [Accessed: 18-Dec-2024].
Gennari, Jeff, Shaun Hedrick, Fred Long, Justin Pincar, and Robert Seacord. "Ranged Integers for the C Programming Language." (Technical Note CMU/SEI-2007-TN-027). Carnegie Mellon University, Software Engineering Institute's Digital Library, Software Engineering Institute, 1 Sep. 2007. https://doi.org/10.1184/R1/6582830.v1. Accessed 18 Dec. 2024.
Gennari, Jeff; Hedrick, Shaun; Long, Fred; Pincar, Justin; & Seacord, Robert. Ranged Integers for the C Programming Language. CMU/SEI-2007-TN-027. Software Engineering Institute. 2007. https://doi.org/10.1184/R1/6582830.v1