Sun Studio 12: C User's Guide

B.2.12 -erroff[=t]

This command suppresses C compiler warning messages and has no effect on error messages. This option applies to all warning messages whether or not they have been designated by -errwarn to cause a non-zero exit status.

t is a comma-separated list that consists of one or more of the following: tag, no%tag, %all, %none. Order is important; for example, %all,no%tag suppresses all warning messages except tag. The following table lists the -erroff values:

Table B–2 The -erroff Flags




Suppresses the warning message specified by this tag. You can display the tag for a message by using the -errtags=yes option.


Enables the warning message specified by this tag


Suppresses all warning messages 


Enables all warning messages (default) 

The default is -erroff=%none. Specifying -erroff is equivalent to specifying -erroff=%all.

Only warning messages from the C compiler front-end that display a tag when the -errtags option is used can be suppressed with the -erroff option. You can achieve finer control over error message suppression. See 2.8.6 error_messages.