File: autoconf.info, Node: Portable C and C++, Next: Manual Configuration, Prev: Portable Make, Up: Top 13 Portable C and C++ Programming ********************************* C and C++ programs often use low-level features of the underlying system, and therefore are often more difficult to make portable to other platforms. Several standards have been developed to help make your programs more portable. If you write programs with these standards in mind, you can have greater confidence that your programs work on a wide variety of systems. *Note Language Standards Supported by GCC: (gcc)Standards, for a list of C-related standards. Many programs also assume the Posix standard (https://en.wikipedia.org/wiki/POSIX). The first widely used C variant was K&R C, which predates any C standard. K&R C compilers are no longer of practical interest, though, and Autoconf assumes at least C89, the first C standard, which is sometimes called "C90" due to a delay in standardization. C has since gone through the standards C99, C11, C17, and C23, and Autoconf is compatible with all these standards. Program portability is a huge topic, and this section can only briefly introduce common pitfalls. *Note Portability between System Types: (standards)System Portability, for more information. * Menu: * Varieties of Unportability:: How to make your programs unportable * Integer Overflow:: When integers get too large * Preprocessor Arithmetic:: ‘#if’ expression problems * Null Pointers:: Properties of null pointers * Buffer Overruns:: Subscript errors and the like * Volatile Objects:: ‘volatile’ and signals * Floating Point Portability:: Portable floating-point arithmetic * Exiting Portably:: Exiting and the exit status