Sun Studio 12: C++ User's Guide

A.2.101 +w2

Emits all the warnings emitted by +w plus warnings about technical violations that are probably harmless, but that might reduce the maximum portability of your program.

The +w2 option no longer warns about the use of implementation-dependent constructs in the system header files. Because the system header files are the implementation, the warning was inappropriate. Removing these warnings from +w2 enables more aggressive use of the option.

A.2.101.1 Warnings

Some Solaris OS and C++ standard header files result in warnings when compiled with +w2.

See also

+w