Jelajahi Sumber

* fixed spurious "Expectloc is not set in firstpass" when compiler is compiled with EXTDEBUG, and
there's a node that's converted to another node in pass 1

git-svn-id: branches/z80@45058 -

nickysn 5 tahun lalu
induk
melakukan
ac3eda1360
1 mengubah file dengan 8 tambahan dan 8 penghapusan
  1. 8 8
      compiler/pass_1.pas

+ 8 - 8
compiler/pass_1.pas

@@ -189,18 +189,18 @@ implementation
                        p:=hp;
                      end;
                    if codegenerror then
-                     include(p.flags,nf_error)
-                   else
-                     begin
-{$ifdef EXTDEBUG}
-                       if (p.expectloc=LOC_INVALID) then
-                         Comment(V_Warning,'Expectloc is not set in firstpass: '+nodetype2str[p.nodetype]);
-{$endif EXTDEBUG}
-                     end;
+                     include(p.flags,nf_error);
                  end;
              until not assigned(hp) or
                    (nf_pass1_done in hp.flags);
              include(p.flags,nf_pass1_done);
+{$ifdef EXTDEBUG}
+             if not(nf_error in p.flags) then
+               begin
+                 if (p.expectloc=LOC_INVALID) then
+                   Comment(V_Warning,'Expectloc is not set in firstpass: '+nodetype2str[p.nodetype]);
+               end;
+{$endif EXTDEBUG}
              codegenerror:=codegenerror or oldcodegenerror;
              current_settings.localswitches:=oldlocalswitches;
              current_filepos:=oldpos;