From 185fa10345b07ae4a42b4c41396869a67b7f439f Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 26 Jul 2002 11:16:35 +0000 Subject: [PATCH] * fixed (actual and potential) range errors --- compiler/cutils.pas | 9 ++++++--- compiler/i386/n386inl.pas | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/compiler/cutils.pas b/compiler/cutils.pas index 0ce2213d9e..96eb183c4b 100644 --- a/compiler/cutils.pas +++ b/compiler/cutils.pas @@ -62,7 +62,7 @@ interface function PadSpace(const s:string;len:longint):string; function GetToken(var s:string;endchar:char):string; procedure uppervar(var s : string); - function hexstr(val : cardinal;cnt : longint) : string; + function hexstr(val : cardinal;cnt : cardinal) : string; function tostru(i:cardinal) : string; function tostr(i : longint) : string; function int64tostr(i : int64) : string; @@ -329,7 +329,7 @@ uses end; - function hexstr(val : cardinal;cnt : longint) : string; + function hexstr(val : cardinal;cnt : cardinal) : string; const HexTbl : array[0..15] of char='0123456789ABCDEF'; var @@ -803,7 +803,10 @@ initialization end. { $Log$ - Revision 1.20 2002-07-07 11:13:34 carl + Revision 1.21 2002-07-26 11:16:35 jonas + * fixed (actual and potential) range errors + + Revision 1.20 2002/07/07 11:13:34 carl * range check error fix (patch from Sergey) Revision 1.19 2002/07/07 09:52:32 florian diff --git a/compiler/i386/n386inl.pas b/compiler/i386/n386inl.pas index 518c6433ab..1a61a84b8c 100644 --- a/compiler/i386/n386inl.pas +++ b/compiler/i386/n386inl.pas @@ -275,7 +275,7 @@ implementation scratch_reg : boolean; hregister : tregister; asmop : tasmop; - L : longint; + L : cardinal; pushedregs : TMaybesave; cgop : topcg; begin @@ -284,7 +284,7 @@ implementation if tcallparanode(tcallparanode(left).right).left.nodetype=ordconstn then begin { calculate bit position } - l:=1 shl (tordconstnode(tcallparanode(tcallparanode(left).right).left).value mod 32); + l:=cardinal(1 shl (tordconstnode(tcallparanode(tcallparanode(left).right).left).value mod 32)); { determine operator } if inlinenumber=in_include_x_y then @@ -354,7 +354,10 @@ begin end. { $Log$ - Revision 1.50 2002-07-25 18:02:33 carl + Revision 1.51 2002-07-26 11:16:35 jonas + * fixed (actual and potential) range errors + + Revision 1.50 2002/07/25 18:02:33 carl + added generic inline nodes Revision 1.49 2002/07/20 11:58:02 florian