Warn Option

The -mwarn=level option is used to set the warning level threshold. Allowable warning levels range from -9 to 9. The warning level determines how pedantic the compiler is about dubious type conversions and constructs. Each warning has a designated warning level; the higher the warning level, the more important the warning message. If the warning message’s warning level exceeds the set threshold, the warning is printed. The default warning level threshold is 0 and will allow all normal warning messages.

Use this option with care as some warning messages indicate code that is likely to fail during execution, or compromise portability.

The warnings from the Clang front end are not controlled by this option.

Compiler Messages has full information on the compiler’s messaging system.