WARN0X | NOWARN0X (C++11)
Note: IBM® supports selected features of
C++11, known as C++0x before its ratification. IBM will
continue to develop and implement the features of this standard. The implementation of the language
level is based on IBM's interpretation of the standard. Until
IBM's implementation of all the C++11 features is complete,
including the support of a new C++11 standard library, the implementation may change from release to
release. IBM makes no attempt to maintain compatibility, in
source, binary, or listings and other compiler interfaces, with earlier releases of IBM's implementation of the new C++11 features.
Category
Error checking and debugging
Pragma equivalent
None.
Purpose
Generates messages about differences caused by migration from the C++98 standard to the C++11 standard.
Syntax
Defaults
NOWARN0X
Usage
This option controls whether to inform you with messages about differences in your programs caused by migration from the C++98 standard to the C++11 standard. For example, when LANGLVL(NOC99PREPROCESSOR) and WARN0X are specified, the C++11 preprocessor evaluates the controlling expressions in the #if and #elif conditional inclusion directives, and compares the evaluation results against that of the non-C++11 preprocessor. If they are different, the compiler issues a warning message.
When the WARN0X option is enabled, for each occurrence
of the following keywords, the compiler issues a message if the corresponding
C++11 features and keywords are disabled:
- constexpr
- decltype
- static_assert
For example, when the WARN0X option is
enabled, if you specify both the LANGLVL(NOSTATIC_ASSERT) and NOKEYWORD(static_assert)
options, the compiler treats
static_assert
as an
identifier token and issues the following message for each static_assert
identifier
it encounters:C++0x will reserve "static_assert" as a keyword whose C++0x feature can
be enabled by -qlanglvl=static_assert.
Predefined macros
None.