Description
Pre-defined C/C++ Compiler Macros is a wiki that lists the macros C and C++ compilers define automatically. Programmers use them to detect standards, compilers, libraries, operating systems and hardware architectures at compile time, which helps when writing portable software. The pages are organised into standards, compilers, libraries, operating systems and architectures, with general guidelines on version normalization, feature macros and endianness. The macros come from vendor documentation, a defines script, contributors and third-party source code, and the authors state that correctness is not guaranteed. Updates and corrections are accepted by mail or through pull requests on GitHub.…
Highlights
- Macros grouped by standards, compilers, libraries, OS and architectures
- Guidelines on version normalization and feature macros
- Notes on endianness
- Sources include vendor documentation and contributors
- Corrections accepted via pull requests
Ratings & Reviews
No ratings yet
Be the first to rate Predef.
People also visit
Predef FAQ
What is this wiki?
A reference of the macros C and C++ compilers define automatically, used to identify compilers, operating systems and architectures.
Who is it for?
C and C++ developers writing portable code.
Where do the macros come from?
Vendor documentation, the defines script, contributors and third-party source code. The page says no guarantee of correctness is given.
Is it an alternative to Autoconf?
The page mentions Autoconf, Buildtool, CMake, SCons and others as alternatives for examining features and compile options.
How do I suggest a correction?
Send updates to predef-contribute or open a pull request on GitHub.
What are the best Predef alternatives?
Popular alternatives to Predef include cppstat, Standardese and Codex Plusplus. See all Predef alternatives





