Oracle® Solaris Studio 12.4: C User's Guide

Exit Print View

Updated: March 2015
 
 

2.11.8 error_messages

#pragma error_messages (on|off|default, tag… tag)

The error_messages pragma provides control within the source program over the messages issued by the C compiler and lint. For the C compiler, the pragma has an effect on warning messages only. The -w option of the C compiler overrides this pragma by suppressing all warning messages.

  • #pragma error_messages (on, tag… tag)

    The on option ends the scope of any preceding #pragma error_messages option, such as the off option, and overrides the effect of the -erroff option.

  • #pragma error_messages (off, tag… tag)

    The off option prevents the C compiler or the lint program from issuing the given messages beginning with the token specified in the pragma. The scope of the pragma for any specified error message remains in effect until overridden by another error_messages pragma, or the end of compilation.

  • #pragma error_messages (default, tag… tag)

    The default option ends the scope of any preceding #pragma error_messages directive for the specified tags.