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

File: autoconf.info,  Node: Preprocessor Arithmetic,  Next: Null Pointers,  Prev: Integer Overflow,  Up: Portable C and C++++

13.3 Preprocessor Arithmetic
============================

In C99 and later, preprocessor arithmetic, used for ‘#if’ expressions,
must be evaluated as if all signed values are of type ‘intmax_t’ and all
unsigned values of type ‘uintmax_t’.  Many compilers are buggy in this
area, though.  For example, as of 2007, Sun C mishandles ‘#if LLONG_MIN
< 0’ on a platform with 32-bit ‘long int’ and 64-bit ‘long long int’.
Also, some older preprocessors mishandle constants ending in ‘LL’.  To
work around these problems, you can compute the value of expressions
like ‘LONG_MAX < LLONG_MAX’ at ‘configure’-time rather than at
‘#if’-time.

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