pTAL Conversion Guide

Compiler Operation
pTAL Conversion Guide527302-002
19-14
For pTAL and TAL
CHECKSHIFTCOUNT
CHECKSHIFTCOUNT controls instruction traps for invalid shift operations.
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;
NOCHECKSHIFTCOUNT
NO CHECKSHIFTCOUNT
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 the pTAL Reference Manual.
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