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

If _near is used to modify a pointer and neither _waddr or _baddr is specified, the pointer
can contain either a byte address or a TNS word address:
Then Pointer ContainsIf Type Pointed To Is
byte address8-bit scalar
1
TNS word addressgreater than an 8-bit scalar
1
byte addressvoid
TNS word addressstruct
Pointer is the same as a pointer to an element of the array.array
1
Arithmetic types and pointer types are called scalar types. Integral and floating types are collectively called arithmetic
types.
The type qualifier extptr is considered obsolete, but TNS C and C++ still support it for _tal
prototypes. Programs that use this feature will not compile with the native C and C++ compilers.
For TNS only, certain implicit casting of pointers might result in diagnostics. Table 7 lists which
implicit conversions cause a warning or an error. The column on the far left lists the “from
pointer type and the column headings list the “to” pointer types.
Table 7 Implicit Pointer Casts
To TypeFrom Type
_procaddr_cspace_near _baddr_near _waddr_far
errorwarning
1
errorerrorvalid_far
errorwarning
1
warningvalidvalid_near _waddr
errorwarning
1
validwarningvalid_near _baddr
errorvalidwarning
1
warning
1
warning
1
_cspace
validerrorerrorerrorerror_procaddr
1
TNS C++ gives an error for these cases.
For TNS only, the compiler generates code to perform implicit conversions for all cases in
Table 7, marked valid or warning. However, in the warning cases, the resulting value may
lose some information. Explicit casts can be used to override the implicit casts.
For TNS only, a pointer with a _baddr modifier cannot be used to access any TNS
word-addressed data types. A pointer with a _waddr modifier cannot be used to access any
byte-addressed data types.
For TNS only, pointer arithmetic can be performed only on pointers that point to the same
address space. The address spaces are user data space and code space.
For TNS only, _procaddr can be applied only to void *.
A pointer declared with the _procaddr type qualifier cannot be fused to call a function. The
value must be assigned to a typed function pointer and called through that pointer.
Operators
An expression comprises a sequence of operators and operands. An operator specifies an operation
that results in a value. The items on which the operator acts are called operands. Operators that
act on one operand are referred to as unary operators. Operators that act on two operands are
referred to as binary operators. This subsection describes the extensions HP has made to the
operators defined in the ISO/ANSI C standard.
Operators 61