浏览代码

* don't give an "abstract method called" error for g_rangecheck()
if range checking is disabled

git-svn-id: branches/jvmbackend@18334 -

Jonas Maebe 14 年之前
父节点
当前提交
e1b6398b47
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      compiler/hlcgobj.pas

+ 8 - 1
compiler/hlcgobj.pas

@@ -369,7 +369,7 @@ unit hlcgobj;
              @param(p Node which contains the value to check)
              @param(todef Type definition of node to range check)
           }
-          procedure g_rangecheck(list: TAsmList; const l:tlocation; fromdef,todef: tdef); virtual; abstract;
+          procedure g_rangecheck(list: TAsmList; const l:tlocation; fromdef,todef: tdef); virtual;
 
           {# Generates overflow checking code for a node }
           procedure g_overflowcheck(list: TAsmList; const Loc:tlocation; def:tdef); virtual; abstract;
@@ -1585,6 +1585,13 @@ implementation
       g_concatcopy(list,size,source,dest);
     end;
 
+  procedure thlcgobj.g_rangecheck(list: TAsmList; const l: tlocation; fromdef, todef: tdef);
+    begin
+      if not(cs_check_range in current_settings.localswitches) then
+        exit;
+      internalerror(2011010610);
+    end;
+
   procedure thlcgobj.g_profilecode(list: TAsmList);
     begin
     end;