mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-03 14:49:33 +01:00
* avoid range check errors
git-svn-id: trunk@39990 -
This commit is contained in:
parent
d4cf97a755
commit
116f36fe56
@ -377,7 +377,7 @@ implementation
|
||||
|
||||
function taddnode.simplify(forinline : boolean) : tnode;
|
||||
|
||||
function is_range_test(nodel, noder: taddnode; var value: tnode; var cl,cr: qword): boolean;
|
||||
function is_range_test(nodel, noder: taddnode; var value: tnode; var cl,cr: Tconstexprint): boolean;
|
||||
const
|
||||
is_upper_test: array[ltn..gten] of boolean = (true,true,false,false);
|
||||
inclusive_adjust: array[boolean,ltn..gten] of integer = ((1,0,-1,0),
|
||||
@ -460,7 +460,7 @@ implementation
|
||||
resultset : Tconstset;
|
||||
res,
|
||||
b : boolean;
|
||||
cr, cl : qword;
|
||||
cr, cl : Tconstexprint;
|
||||
begin
|
||||
result:=nil;
|
||||
l1:=0;
|
||||
|
||||
@ -159,7 +159,8 @@ Unit rappcgas;
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
oper.opr.Ref.Offset:=BuildConstExpression(false,true);
|
||||
{ cast explicitly to avoid range check errors }
|
||||
oper.opr.Ref.Offset:=ASizeInt(BuildConstExpression(false,true));
|
||||
Consume(AS_RPAREN);
|
||||
if actasmtoken=AS_AT then
|
||||
ReadAt(oper);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user