manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Integer Overflow,  Next: Preprocessor Arithmetic,  Prev: Varieties of Unportability,  Up: Portable C and C++++

13.2 Integer Overflow
=====================

Although some traditional C programs assume that signed integer overflow
wraps around reliably using two's complement arithmetic, the C standard
says that program behavior is undefined on overflow, and these C
programs may not work on many modern implementations.

* Menu:

* Integer Overflow Basics::     Why integer overflow is a problem
* Signed Overflow Examples::    Examples of code assuming wraparound
* Optimization and Wraparound::  Optimizations that break uses of wraparound
* Signed Overflow Advice::      Practical advice for signed overflow issues
* Signed Integer Division::     ‘INT_MIN / -1’ and ‘INT_MIN % -1’

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.