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

Table Of Contents
C and C++ Extensions
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
2-16
Pointer Modifiers
Ptr-operator for C++ Programming Language
cv-qualifier-seq and nested-name-specifier are described in the draft
ANSI C++ standard.
_far
denotes a 32-bit extended byte address.
_near
denotes a 16-bit address and points to the lower 32K of the user data segment.
_baddr
modifies _near, and denotes that the address is a byte address.
_waddr
modifies _near, and denotes that the address is a TNS word address.
_procaddr
denotes a DPCL entry point id in TNS environment.
Usage Guidelines
For TNS C and C++, the pointer modifiers are independent of the memory model
used. A _near pointer is 16 bits for both the small and large-memory models. A
_far pointer is 32 bits for both the small and large-memory models. For native C
and C++, the pointer modifiers have no effect and are added only to provide
source-level compatibility with TNS C and C++. For native C and C++, all pointers
are 32-bit byte addresses.
The same modifier is not allowed to appear more than once in the modifier-
list for a pointer declaration.
The modifiers _far and _near are mutually exclusive.
The modifiers _baddr, _waddr, and _procaddr are mutually exclusive; at most
one is allowed.
ptr-operator:
[ modifier-list ] * [ cv-qualifier-seq ]
[ modifier-list ] & [ cv-qualifier-seq ]
[ :: ] nested-name-specifier [ modifier-list ] *
[ cv-qualifier-seq ]
modifier-list:
modifier [ modifier-list ]
modifier:
_far | _near | _baddr | _waddr | _procaddr