Predefined Macros

The following table lists the macros, which are predefined by the Wave library. Some of these (all except the __LINE__, __FILE__, __DATE__, __TIME__, __STDC__, __INCLUDE_LEVEL__ and __cplusplus macros, in C++0x mode the __STDC_GLOBAL__, __STDC_FULL_REGION__ and __STDC__CURRENT_REGION__ macros are not undefinable too) may be undefined from the command line of the driver executable (see the -U option) or through the function remove_macro_definition().

In C++0x mode the predefined macros are available at every macro scope (except __STDC_GLOBAL__, which is available at global macro scope only).

Summary of predefined macros
Name

Value

Undefinable
__STDC__

1 (a decimal constant)

yes

__cplusplus

199711L (a decimal constant), this is defined in C++ mode only (C99 mode is off)
In the C++0x mode this decimal constant is guaranteed to be larger than 199711L (the concrete value is to be defined by the C++ committee).

no

__LINE__

The line number of the current source line (a decimal constant)

no

__FILE__

The presumed name of the source file (a character string literal)

no

__DATE__

The date of translation of the source file (a character string literal of the form
"Mmm dd yyyy", where the names of the months are the same as those generated by the asctime function, and the first character of dd is a space character if the value is less than 10).

no

__TIME__

The time of translation of the source file (a character string literal of the form "hh:mm:ss"
as in the time generated by the asctime function).

no

__INCLUDE_LEVEL__

A decimal integer constant that represents the depth of nesting in include
files. The value of this macro is incremented on every #include directive
and decremented at every end of file.

no

__WAVE__
__SPIRIT_PP__

The version of the driver program (a hexadecinal constant of the form 0xMmrr, where 'M' is the major version number, 'm' the minor version number and 'rr' the release number).

yes

__WAVE_VERSION__
__SPIRIT_PP_VERSION__

The full version number of the driver program (a hexadecinal constant of the form 0xMmrrbbbb, where 'M' is the major version number, 'm' the minor version number, 'rr' the release number and 'bbbb' the build number).

yes

__WAVE_VERSION_STR__
__SPIRIT_PP_VERSION_STR__

The full version number of the driver program (a character string literal of the form "M.m.rr.bbbb", where 'M' is the major version number, 'm' the minor version number, 'rr' the release number and 'bbbb' the build number).

yes

__STDC_VERSION__

199901L (a decimal constant), this is defined in C99 mode only

yes

__WAVE_HAS_VARIADICS__

1 (a decimal constant), this is defined in C++ mode only, if variadics and placemarkers are enabled, further it is defined in C99 and C++0x modes

no

__STDC_GLOBAL__

1 (a decimal constant), this is defined in C++0x mode only and only at global macro scope

no

__STDC_CURRENT_REGION__

The name of the current active macro region (a string literal). This constant does not contain the full qualified scope name, but only it's last part. This macro is defined in C++0x mode only.

no

__STDC_FULL_REGION__

The name of the current active macro region (a string literal). This constant does contain the full qualified scope name, not only it's last part. This macro is defined in C++0x mode only.

no



Last updated: Monday, January 5, 2004 14:57