Advanced Search

Content Type

Topics

Publication Date

Ranged Integers for the C Programming Language

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 Report

Show Citation Formats

SEI

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, Carnegie Mellon University, 2007. http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=8265

IEEE

Gennari. Jeff, Hedrick. Shaun, Long. Fred, Pincar. Justin, and Seacord. Robert, "Ranged Integers for the C Programming Language," Software Engineering Institute, Carnegie Mellon University, Pittsburgh, Pennsylvania, Technical Note CMU/SEI-2007-TN-027, 2007. http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=8265

APA

Gennari, Jeff., Hedrick, Shaun., Long, Fred., Pincar, Justin., & Seacord, Robert. (2007). Ranged Integers for the C Programming Language (CMU/SEI-2007-TN-027). Retrieved April 16, 2014, from the Software Engineering Institute, Carnegie Mellon University website: http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=8265

CHI

Jeff Gennari, Shaun Hedrick, Fred Long, Justin Pincar, & Robert Seacord. Ranged Integers for the C Programming Language (CMU/SEI-2007-TN-027). Pittsburgh, PA: Software Engineering Institute, Carnegie Mellon University, 2007. http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=8265

MLA

Gennari, Jeff., Hedrick, Shaun., Long, Fred., Pincar, Justin., & Seacord, Robert. 2007. Ranged Integers for the C Programming Language (Technical Report CMU/SEI-2007-TN-027). Pittsburgh: Software Engineering Institute, Carnegie Mellon University. http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=8265