ILE C/C++ Predefined Macros
__ANSI__
- Defined when the LANGLVL(*ANSI) compiler option is in effect. When this macro is defined, the compiler allows only language constructs that conform to the ANSI/ISO C and C++ standards.
__ASYNC_SIG__
- Defined
when the SYSIFCOPT(*ASYNCSIGNAL) compiler option is in effect.
Defined when TERASPACE(*YES *TSIFC) STGMDL(*TERASPACE) DTAMDL(*LLP64) RTBND(*LLP64) compiler options are in effect.
__BASE_FILE__
- Indicates the fully qualified name of the primary source file.
__BOOL__
- Indicates that the bool keyword is accepted.
_CHAR_SIGNED __CHAR_SIGNED__
- Defined when the #pragma chars(signed) directive is in effect, or when the DFTCHAR compiler option is set to *SIGNED. If this macro is defined, the default character type is signed.
_CHAR_UNSIGNED __CHAR_UNSIGNED__
- Defined when the #pragma chars(unsigned) directive is in effect, or when the DFTCHAR compiler option is set to *UNSIGNED. If this macro is defined, indicates default character type is unsigned.
__cplusplus98__interface__
- Defined when the LANGLVL(*ANSI) compiler option is specified.
__C99_BOOL
- Indicates support for the _Bool data type. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_CPLUSCMT
- Indicates support for C++ style comments. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_COMPOUND_LITERAL
- Indicates
support for compound literals.
Defined when
the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_DESIGNATED_INITIALIZER
- Indicates support for designated initialization. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_DUP_TYPE_QUALIFIER
- Indicates support for duplicated type qualifiers. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_EMPTY_MACRO_ARGUMENTS
- Indicates support for empty macro arguments. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_FLEXIBLE_ARRAY_MEMBER
- Indicates support for flexible array members. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_FUNC__
- Indicates
support for the
__func__ predefined identifier. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_HEX_FLOAT_CONST
- Indicates
support for hexadecimal floating constants.
Defined
when the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_INLINE
- Indicates support for the inline function specifier. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_LLONG
- Indicates support for C99-style long long data types and literals. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_MACRO_WITH_VA_ARGS
- Indicates
support for function-like macros with variable arguments.
Defined
when the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_MAX_LINE_NUMBER
- Indicates
that the maximum line number is 2147483647.
Defined
when the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_MIXED_DECL_AND_CODE
- Indicates support for mixed declaration and code. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_MIXED_STRING_CONCAT
- Indicates support for concatenation of wide string and non-wide string literals. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_NON_CONST_AGGR_INITIALIZER
- Indicates support for non-constant aggregate initializers. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_NON_LVALUE_ARRAY_SUB
- Indicates support for non-lvalue subscripts for arrays. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_PRAGMA_OPERATOR
- Indicates
support for the _Pragma operator.
Defined when
the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_RESTRICT
- Indicates support for the C99 restrict qualifier. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__C99_STATIC_ARRAY_SIZE
- Indicates support for the static keyword in array parameters to functions. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_VAR_LEN_ARRAY
- Indicates support for variable length arrays. Defined when the LANGLVL(*EXTENDED) compiler option is in effect.
__C99_VARIABLE_LENGTH_ARRAY
- Indicates support for variable length arrays. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__DIGRAPHS__
- Indicates support for digraphs.
__EXTENDED__
- Defined
when the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
When this macro is defined, the compiler allows language extensions provided by the ILE C/C++ compiler implementation.
__FUNCTION__
- Indicates the name of the function currently being compiled. For C++ programs, expands to the actual function prototype.
__HHW_AS400__
- Indicates that the host hardware is an IBM® i processor.
__HOS_OS400__
- Indicates that the host operating system is IBM i.
__IBMC__
- Indicates
the version of the C compiler. It returns an integer of the form VRM
where:
V
represents the versionR
represents the releaseM
represents the modification levelFor example, using the IBM i 7.2 compiler with the TGTRLS(*CURRENT) compiler option, __IBMC__ returns the integer value 720.
__IBMCPP__
- Indicates the version of the AIX® XL C++ compiler upon which the ILE C++ compiler is based. It returns an integer representing the compiler version. For example, using the IBM i 7.2 compiler with the TGTRLS(*CURRENT) compiler option, __IBMCPP__ returns the integer value 1110. 1110 means the ILE C++ compiler is based on the XL C++ V11.1 compiler.
__IBM__ALIGN
- Indicates support for the __align specifier.
__IBM_ATTRIBUTES
- Indicates support for type, variable, and function attributes. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_COMPUTED_GOTO
- Indicates support for computed goto statements. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_DFP__
- Indicates
support for decimal floating-point types.
Defined when
the LANGLVL(*EXTENDED) compiler option is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_EXTENSION_KEYWORD
- Indicates support for the __extension__ keyword. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_INCLUDE_NEXT
- Indicates support for the #include_next preprocessing directive.
__IBM_LABEL_VALUE
- Indicates support for labels as values. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_LOCAL_LABEL
- Indicates support for local labels. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_MACRO_WITH_VA_ARGS
- Indicates support for variadic macro extensions. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBM_TYPEOF__
- Indicates
support for the __typeof__ or typeof keyword. This macro is always
defined for C.
For C++, it is defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_AUTO_TYPEDEDUCTION
- Indicates support for the auto type deduction feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_C99_PREPROCESSOR
- Indicates support for the C99 preprocessor features adopted in the C++0x standard. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_DECLTYPE
- Indicates support for the decltype feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_DELEGATING_CTORS
- Indicates support for the delegating constructors feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_EXTENDED_FRIEND
- Indicates support for the extended friend declarations feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_EXTERN_TEMPLATE
- Indicates support for the explicit instantiation declarations feature. Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_INLINE_NAMESPACE
- Indicates support for the inline namespace definitions feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IBMCPP_STATIC_ASSERT
- Indicates support for the static assertions feature. Defined when the LANGLVL(*EXTENDED0X) compiler option is in effect.
__IFS_IO__
- Defined when the SYSIFCOPT(*IFSIO) or SYSIFCOPT(*IFS64IO) compiler option is specified.
__IFS64_IO__
- Defined when the SYSIFCOPT(*IFS64IO) compiler option is specified. When this macro is defined, _LARGE_FILES and _LARGE_FILE_API are also defined in the relevant IBM-supplied header files.
__ILEC400__
- Indicates that the ILE C compiler is being used.
__ILEC400_TGTVRM__
- Same as the __OS400_TGTVRM__ macro.
_LARGE_FILES
- Defined when the SYSIFCOPT(*IFS64IO) compiler option is in effect and system header file types.h is included.
_LARGE_FILE_API
- Defined when the SYSIFCOPT(*IFS64IO) compiler option is in effect and system header file types.h is included.
__LLP64_IFC__
- Defined when the DTAMDL(*LLP64) compiler option is in effect.
__LLP64_RTBND__
- Defined when the RTBND(*LLP64) compiler option is in effect.
__LONGDOUBLE64
- Indicates that the size of a long double type is 64 bits. This macro is always defined.
_LONG_LONG
- Indicates
support for IBM long long data
types.
Defined when the LANGLVL(*EXTENDED) compiler option
is in effect.
Defined when the LANGLVL(*EXTENDED) or LANGLVL(*EXTENDED0X) compiler option is in effect.
__NO_RTTI__
- Defined when the OPTION(*NORTTI) compiler option is in effect.
__OPTIMIZE__
- Indicates the level of optimization in effect. The macro
is undefined for OPTIMIZE(10). For other OPTIMIZE settings, the macro
is defined as follows:
2
for OPTIMIZE(20)3
for OPTIMIZE(30)4
for OPTIMIZE(40) __OS400__
- This macro is always defined when the compiler is used with the IBM i operating system.
__OS400_TGTVRM__
- Defines an integer value that maps to the version/release/modification level of the operating system that the generated object is intended to run on. For example, if the target release is set using the TGTRLS(V7R2M0) compiler option, this macro returns the integer value 720.
__POSIX_LOCALE__
- Defined when the LOCALETYPE(*LOCALE) or LOCALETYPE(*LOCALEUCS2) or LOCALETYPE(*LOCALEUTF) compiler option is specified.
__RTTI_DYNAMIC_CAST__
- Defined when the OPTION(*RTTIALL) or OPTION(*RTTICAST) compiler option is specified.
__RTTI_TYPE_INFO__
- Defined when the OPTION(*RTTIALL) or OPTION(*RTTITYPE) compiler option is specified.
__SIZE_TYPE__
- Indicates the underlying type of size_t on the current platform. For IBM i, it is unsigned int.
__SRCSTMF__
- Defined when the SRCSTMF compiler option specifies the location of the source file being compiled.
__TERASPACE__
- Defined when the TERASPACE(*YES *TSIFC) compiler option is specified.
__THW_AS400__
- Indicates that the target hardware is an IBM i processor.
__TIMESTAMP__
- A
character string literal containing the date and time when the source
file was last changed. The date and time are in the form:
where:"Day Mmm dd hh:mm:ss yyyy"
Day
represents the day of the week (Mon
,Tue
,Wed
,Thu
,Fri
,Sat
, orSun
).Mmm
represents the month in an abbreviated form (Jan
,Feb
,Mar
,Apr
,May
,Jun
,Jul
,Aug
,Sep
,Oct
,Nov
, orDec
).dd
represents the day. If the day is less than 10, the firstd
is a blank character.hh
represents the hour.mm
represents the minutes.ss
represents the seconds.yyyy
represents the year.Note: Other compilers might not support this macro. If the macro is supported on other compilers, the date and time values might be different from the values shown here. __TOS_OS400__
- Indicates that the target operating system is IBM i.
__UCS2__
- Defined when the LOCALETYPE(*LOCALEUCS2) compiler option is specified.
__UTF32__
- Defined when the LOCALETYPE(*LOCALEUTF) compiler option is specified.
__wchar_t
- Indicates
that the typedef wchar_t has been defined.
This
macro is defined in the standard header file stddef.h.
This macro is defined by the C++ compiler.