C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-9
ANSICOMPLY
ANSICOMPLY
The ANSICOMPLY pragma directs the TNS C compiler to perform strict syntax checking
for compliance to the ISO/ANSI C standard.
The pragma default settings are:
Usage Guidelines
•
In the Guardian TNS C environment, the ANSICOMPLY pragma can appear either
on the compiler RUN command line or in the source text. However, in the G-series
OSS TNS C environment, the ANSICOMPLY pragma must be specified in the
source file. In either environment, if you use the pragma within a source file, the
pragma must appear before any C language source statements.
•
The ANSICOMPLY pragma also sets the ANSISTREAMS pragma.
•
For ISO/ANSI C standard compliance checking, the compiler:
°
Disables arithmetic overflow traps.
°
Flags HP C language extensions for NonStop systems.
°
Checks for conformance to the #define preprocessor directive. For a
description of the difference between HP C and the ISO/ANSI C standard, see
Section 10, Converting C-Series TNS Programs to Use the Current TNS
Compiler.
•
The native C and C++ compilers do not support this pragma; use the
NOEXTENSIONS pragma instead.
ANSICOMPLY
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler Not set Not set
G-series TNS c89 utility Not set Not set
TNS/R native C and C++ compilers N.A. N.A.
Native c89 utility N.A. N.A.
TNS/E native C and C++ compilers N.A. N.A.