Sun Studio 12 Update 1: C++ User's Guide

A.2.101 +w

Identifies code that might have unintended consequences. The +w option no longer generates a warning if a function is too large to inline or if a declared program element is unused. These warnings do not identify real problems in the source, and were thus inappropriate to some development environments. Removing these warnings from +w enables more aggressive use of +w in those environments. These warnings are still available with the +w2 option.

This option generates additional warnings about questionable constructs that are:

A.2.101.1 Defaults

If +w is not specified, the compiler warns about constructs that are almost certainly problems.

See also

–w, +w2