Ranged Integers for the C Programming Language

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.

PDF [199 KB]

Authors

Jeff Gennari

Shaun Hedrick

Fred Long

Justin Pincar

Robert C. Seacord

This report is related to the following area(s) of work:

Security and Survivability

Technical Note
CMU/SEI-2007-TN-027
September 2007

Find Us Here

Share This Page

Share on Facebook  Send to your Twitter page  Save to del.ico.us  Save to LinkedIn  Digg this  Stumble this page.  Add to Technorati favorites  Save this page on your Google Home Page 

For more information

Contact Us

info@sei.cmu.edu

412-268-5800