C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
A-15
Implementation-Defined Behavior of TNS C
A single struct or union can have 127 members.
A single enumeration can have 127 enumeration constants.
A single structure declaration can have 15 levels of nested structure or union
definitions.
Implementation-Defined Behavior of TNS C
The ISO standard for C allows implementations to vary in specific instances. This
subsection describes the implementation-defined behavior of TNS C. This subsection
corresponds to Annex G.3 of the ISO C standard or Appendix F of the ANSI C
standard.
G.3.1 Translation
Each nonempty sequence of white-space characters, other than newline, is retained.
The form of the diagnostic messages displayed by the TNS compiler is such that the
source line is displayed first, followed by a line of the form: file name line diagnostic-
type: diagnostic message. For example:
100 foo ();
**** \prune.$data.test.testc 100 Warning 95:
prototype function declaration not in scope: “foo”
There are different classes of messages. They are:
ERROR
WARNING
The translator return status code for each class of message is:
0 = Normal, voluntary termination with no errors or warnings.
1 = Normal, voluntary termination with warning diagnostics.
2 = Abnormal, voluntary termination with warning diagnostics.
The level of diagnostic can be controlled. Control takes these form:
For ERROR, the ERRORS pragma directs the compiler to terminate compilation if it
detects more than a specified number of errors. If the ERRORS pragma is not used,
the compiler completes a compilation regardless of the number of errors it
diagnoses.
For WARNING, the WARN pragma controls the generation of all or selected warning
messages. The WARN pragma enables the compiler to generate all or a selected
set of warning messages, and the NOWARN pragma disables the compiler from
generating all or a selected set of warning messages. The compiler defaults to
WARN, which enables all warning messages.