C/C++ Programmer's Guide (G06.25+)
HP C Implementation-Defined Behavior
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
A-14
Translation Limits for Native C Compilers
Translation Limits for Native C Compilers
Native C uses dynamic data structures, so some program components are limited by
the amount of available memory. The following list indicates minimums that are
guaranteed (that is, a program that meets but does not exceed each minimum is
guaranteed to compile). However, if a program significantly exceeds one or more
minimums, it is possible to run out of memory and to receive an error message on a
component whose minimum has not been reached.
•
Compound statements, iteration control statements, and selection control
statements can be nested 15 levels.
•
Conditional #include directives can be nested 8 levels.
•
Arithmetic, structure, union, or incomplete type declarations can have 12 pointer,
array, and function declarators modifying them.
•
A declaration can have 31 nested levels of parenthesized declarators.
•
An expression can have 32 nested levels of parenthesized expressions.
•
An internal identifier or macro name can have 31 significant characters.
•
An external identifier can have 31 significant initial characters.
•
A single translation unit can have 511 external identifiers.
•
A block can have 127 identifiers declared with block scope.
•
A single translation unit can have 1024 macro identifiers defined simultaneously.
•
A macro definition can have 31 parameters and a macro invocation 31 arguments.
•
A logical source line can have 509 characters.
•
A string literal or wide string literal can have 509 characters (after string
concatenation).
•
An object can consist of 32767 bytes.
•
A switch statement can have 257 case labels (excluding any nested switch
statements).
•
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