The standard predefined macros are available with the same meanings
regardless of the machine or operating system on which you are using GNU C.
Their names all start and end with double underscores. Those preceding
__GNUC__
in this table are standardized by ANSI C; the rest are
GNU C extensions.
__FILE__
__LINE__
fprintf (stderr, "Internal error: " "negative string length " "%d at %s, line %d.", length, __FILE__, __LINE__);A `#include' directive changes the expansions of `__FILE__' and `__LINE__' to correspond to the included file. At the end of that file, when processing resumes on the input file that contained the `#include' directive, the expansions of `__FILE__' and `__LINE__' revert to the values they had before the `#include' (but `__LINE__' is then incremented by one as processing moves to the line after the `#include'). The expansions of both `__FILE__' and `__LINE__' are altered if a `#line' directive is used. See section Combining Source Files.
__DATE__
__TIME__
__STDC__
__STDC_VERSION__
__GNUC__
__GNUC_MINOR__
gcc
2.6.3 is known to support a feature, you
can test for __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
).
The last number, `3' in the
example above, denotes the bugfix level of the compiler; no macro
contains this value.
__GNUG__
__cplusplus
__STRICT_ANSI__
__INCLUDE_LEVEL__
__VERSION__
__OPTIMIZE__
__CHAR_UNSIGNED__
char
is
unsigned on the target machine. It exists to cause the standard
header file `limit.h' to work correctly. It is bad practice
to refer to this macro yourself; instead, refer to the standard
macros defined in `limit.h'. The preprocessor uses
this macro to determine whether or not to sign-extend large character
constants written in octal; see section The `#if' Directive.
__REGISTER_PREFIX__
__USER_LABEL_PREFIX__