Definitions automatically provided by the preprocessors of some compilers.
Build the program by running make and then run it to see what is defined.
Compilers have they way for reporting predefined macros. For GCC it could be done like this (see Options Controlling the Preprocessor):
- For GCC (C language):
gcc -dM -E - < /dev/null
- For G++ (C++ language):
g++ -dM -E -x c++ - < /dev/null
Note: Option -x
is important for g++
, so that input is considered C++
source and you see all the pre-defined macros.
- Predefined macros - Pre-defined macros in GCC.
- Pre-defined C/C++ Compiler Macros - An overview of pre-defined compiler macros for standards, compilers, operating systems, and hardware architectures.