C/C++ Programmer's Guide (G06.25+)

Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
13 -111
WARN
warning-list
is a parenthesized, comma-separated list of warning-message numbers. This list
represents the warning messages whose generation the compiler is to enable or
disable.
If you omit warning-list, the WARN or NOWARN pragma affects all warning
messages.
The pragma default settings are:
Usage Guidelines
The WARN pragma can be entered on the compiler RUN command line or in the
source text. The pragma can also be specified with the -W[no]warn flag of the
c89 utility.
There is no correspondence between the warning-message text or numbers
between the TNS C compiler and the native C and C++ compilers.
Examples
In this example, the compiler generates only warning messages 153 and 157.
#pragma nowarn
#pragma warn (153,157)
In this example, the compiler generates all warning messages except warning 153.
#pragma nowarn (153)
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler WARN WARN
G-series TNS c89 utility WARN WARN
TNS/R native C and C++ compilers WARN WARN
Native c89 utility WARN WARN
TNS/E native C and C++ compilers WARN WARN