瀏覽代碼

* call "message" rather than "cgmessage" when throwing fatal errors, because
cgmessage won't do anything in case cgerror is already set (and in several
places we assume that the compiler will immediately abort after throwing a
fatal error)

git-svn-id: trunk@28229 -

Jonas Maebe 11 年之前
父節點
當前提交
4ff597afae
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 4 4
      compiler/symtable.pas
  2. 1 1
      compiler/wpoinfo.pas

+ 4 - 4
compiler/symtable.pas

@@ -3069,7 +3069,7 @@ implementation
         sym:=tsym(systemunit.Find(s));
         sym:=tsym(systemunit.Find(s));
         if not assigned(sym) or
         if not assigned(sym) or
            (sym.typ<>typesym) then
            (sym.typ<>typesym) then
-          cgmessage1(cg_f_unknown_system_type,s);
+          message1(cg_f_unknown_system_type,s);
         result:=ttypesym(sym);
         result:=ttypesym(sym);
       end;
       end;
 
 
@@ -3084,7 +3084,7 @@ implementation
         else
         else
           begin
           begin
             if sym.typ<>typesym then
             if sym.typ<>typesym then
-              cgmessage1(cg_f_unknown_system_type,s);
+              message1(cg_f_unknown_system_type,s);
             result:=ttypesym(sym);
             result:=ttypesym(sym);
           end;
           end;
       end;
       end;
@@ -3100,7 +3100,7 @@ implementation
           srsym:=tsym(systemunit.Find(upper(s)));
           srsym:=tsym(systemunit.Find(upper(s)));
         if not assigned(srsym) or
         if not assigned(srsym) or
            (srsym.typ<>procsym) then
            (srsym.typ<>procsym) then
-          cgmessage1(cg_f_unknown_compilerproc,s);
+          message1(cg_f_unknown_compilerproc,s);
         result:=tprocdef(tprocsym(srsym).procdeflist[0]);
         result:=tprocdef(tprocsym(srsym).procdeflist[0]);
     end;
     end;
 
 
@@ -3120,7 +3120,7 @@ implementation
         else
         else
           begin
           begin
             if throwerror then
             if throwerror then
-              cgmessage2(cg_f_unknown_type_in_unit,typename,unitname);
+              message2(cg_f_unknown_type_in_unit,typename,unitname);
             result:=nil;
             result:=nil;
           end;
           end;
       end;
       end;

+ 1 - 1
compiler/wpoinfo.pas

@@ -142,7 +142,7 @@ implementation
     begin
     begin
       { load start of definition section, which holds the amount of defs }
       { load start of definition section, which holds the amount of defs }
       if ppufile.readentry<>ibcreatedobjtypes then
       if ppufile.readentry<>ibcreatedobjtypes then
-        cgmessage(unit_f_ppu_read_error);
+        message(unit_f_ppu_read_error);
 
 
       { don't load the wpo info from the units if we are not generating
       { don't load the wpo info from the units if we are not generating
         a wpo feedback file (that would just take time and memory)
         a wpo feedback file (that would just take time and memory)