Sun Studio 12: C User's Guide

2.8.6 error_messages

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

The error message 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.