-qwarn0x (C++0x)

Note: C++0x is a new version of the C++ programming language standard. IBM continues to develop and implement the features of the new standard. The implementation of the language level is based on IBM's interpretation of the standard. Until IBM's implementation of all the features of the C++0x standard is complete, including the support of a new C++ 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 features of the C++0x standard and therefore they should not be relied on as a stable programming interface.

Category

Error checking and debugging

Pragma equivalent

None.

Purpose

Controls whether to inform users with messages about differences in their programs caused by migration from the C++98 standard to the C++0x standard.

For example, when -qlanglvl=noc99preprocessor and -qwarn0x are specified, the C++0x preprocessor evaluates the controlling expressions in the #if and #elif conditional inclusion directives, and compare the evaluation results against that of the non-C++0x preprocessor. If they are different, the compiler issues the following warning message:
The preprocessor controlling expression evaluates differently between C++0x
and non-C++0x langlvls.
For another example, when you specify both the -qlanglvl=noc99longlong and -qwarn0x options, the compiler might display messages to indicate that the types of an integer literal are different between the non-C++0x and C++0x language levels. In 32-bit mode, when you use the integer literal 2147483648 to initialize a variable, the compiler issues the following message:
Integral constant "2147483648" has implied type unsigned long int under 
the non-C++0x language levels. It has implied type long long int under C++0x.
The compiler issues a similar message for the literal 10000000000000000000 with the same option setting:
Integral constant "10000000000000000000" has implied type unsigned long 
long or is not allowed with "-qlanglvl=extendedintegersafe" under C++0x. 
Its impiled type is not unsigned long long under non-C++0x language levels.
The following C++0x keywords are not reserved in non-C++0x mode:
  • constexpr
  • decltype
  • static_assert
For each occurrence of these keywords, the compiler issues a message if the corresponding C++0x features and keywords are disabled and if the -qwarn0x option is enabled. For example, when you specify both the -qlanglvl=nostatic_assert and -qwarn0x options, the compiler emits the following message for each static_assert token it encounters:
C++0x will reserve "static_assert" as a keyword whose C++0x feature can 
be enabled by -qlanglvl=static_assert.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nowarn0x-.   
>>- -q--+-warn0x---+-------------------------------------------><

Defaults

-qnowarn0x

Usage

This option is in effect when -qwarn0x is set.

Predefined macros

None.

Related information