Pre-defined macros
__date__ string, date of preprocessing ("MMM dd yyyy", if May 27 2006)
__time__ string, the compile time of the source file ("Hh:mm:ss", such as 09:11:10)
__file__ string representing the current source code file name (including a detailed path, such as F:/A.C)
__line__ integer value representing the line number in the current source code file
__stdc__ Boolean value that indicates that the implementation strictly complies with the ANSIC standard
__stdc_version__ Long Integer value that represents the version number of the C standard that the compiler follows (YYYYMML, such as 199101L)
__func__ string, current function name (C99 standard)
__function__ string, same as __func__, not recommended
__pretty_function__ in C, with __func__; In C + +, the header information for the current function is recorded
__VA_ARGS__ saved the variable parameter list "..."
__cplusplus Long Integer value that represents the version number of C + + (YYYYMML, such as 199711L)
/*/char *creationdate = __date__","" $s%d%d,%d:%d:%d", Month, &day, &year, &hour, &min, &sec);
OS Macro
Windows: _win32, WIN32, _win64
Unix:unix, __unix, __unix__
Linux:linux, __linux, __linux__, __gnu_linux__
Sunos/solaris: __SVR4, __svr4__, Sun, __sun, __sun__, SPARC, __sparc, __sparc__
Hpux: __hppa, __hppa__, __hpux, __hpux__, _hupx_source
AIX: _aix, _aix32, _aix41, _aix43, _aix51, _aix52
CPU: __x84_64, __x86_64__, __amd64, __amd64__, SPARC, __sparc, __sparc__
Comiler Macro
__stdc__: Boolean value of 1 o'clock, indicating compatibility with Ansic standard
__gnuc__: Integer value, a predefined macro for the GCC compiler that represents the major version number of GCC
__gnuc_minor__: integer value, gcc minor version number
__gnuc_pathlevel__: integer value, gcc revision number
__glibc__: Integer value, major version number of glib
__glibc_minor__: Integer value, minor version number of glib
For example gcc3.4.5 version, then __gnuc__==3, __gnuc_minor__==4, __gnuc_pathlevel__==6
C-predefined macros commonly used