Browse Source

* 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 -

Jonas Maebe 19 years ago
parent
commit
33e6604b91
1 changed files with 0 additions and 7 deletions
  1. 0 7
      compiler/cgobj.pas

+ 0 - 7
compiler/cgobj.pas

@@ -1693,13 +1693,6 @@ implementation
           exit;
           exit;
 {$endif cpu64bit}
 {$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 }
         { generate the rangecheck code for the def where we are going to }
         { store the result                                               }
         { store the result                                               }