mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
* also perform range checking in case fromdef falls inside todef, in
order to catch invalid operations due to uninitialised values, not type-checked assignments (via explicit typecasts or e.g. blockread), ... git-svn-id: trunk@2608 -
This commit is contained in:
parent
3a60adb3a1
commit
33e6604b91
@ -1693,13 +1693,6 @@ implementation
|
||||
exit;
|
||||
{$endif cpu64bit}
|
||||
|
||||
{ if the from-range falls completely in the to-range, no check }
|
||||
{ is necessary. Don't do this conversion for the largest unsigned type }
|
||||
if (todef<>fromdef) and
|
||||
(from_signed or (hfrom>=0)) and
|
||||
(lto<=lfrom) and (hto>=hfrom) then
|
||||
exit;
|
||||
|
||||
{ generate the rangecheck code for the def where we are going to }
|
||||
{ store the result }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user