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-14
Translation Limits for Native C Compilers
Alignment Issues
Native C and C++ considers objects of integral types to exist only on word boundaries.
Consequently, it is invalid to use an odd-byte address to access such an object. On
TNS/R or TNS/E systems, the results of using an integer type extended pointer
containing an odd-byte address are undefined. The code might continue executing or
trap. Therefore, it is important for you to ensure that all extended pointers contain
addresses that are even except for pointers to char. Extended pointers are those of
type long int or those of type int with the 32-bit (wide) data model in effect, in
which case an int is represented by 32 bits.
Translation Limits for Native C Compilers
Native C uses dynamic data structures, so some program components are limited by
the amount of available memory. This 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).