pTAL Reference Manual (H06.08+)

Compiler Directives
HP pTAL Reference Manual523746-006
17-23
CHECKSHIFTCOUNT
CHECKSHIFTCOUNT
CHECKSHIFTCOUNT
generates code that causes an overflow trap if the number of positions in a bit-shift
operation is too large, as in:
INT j := 20;
INT i;
i := i << j;
(For more information about bit shifts, see Bit Shifts on page 5-33.)
NOCHECKSHIFTCOUNT
suppresses the generation of code that causes an overflow trap if the number of
positions in a bit-shift operation is too large.
PUSHCHECKSHIFTCOUNT
pushes the current setting (CHECKSHIFTCOUNT or NOCHECKSHIFTCOUNT)
onto the CHECKSHIFTCOUNT directive stack. Does not change the current
setting.
POPCHECKSHIFTCOUNT
pops the top value from the CHECKSHIFTCOUNT directive stack and changes the
current setting to that value.
For an explanation of directive stacks, see Directive Stacks on page 17-4.
Caution. If such a bit-shift operation occurs, subsequent program behavior is undefined.
Default: NOCHECKSHIFTCOUNT
Placement: Anywhere
Scope:
CHECKSHIFTCOUNT applies to the shift operators that follow it
until it is overridden by NOCHECKSHIFTCOUNT
NOCHECKSHIFTCOUNT applies to the shift operators that follow it
until it is overridden by CHECKSHIFTCOUNT
Dependencies: None
CHECKSHIFTCOUNT
NOCHECKSHIFTCOUNT
PUSHCHECKSHIFTCOUNT
POPCHECKSHIFTCOUNT
VST659.vsd