Browse Source

--- Merging r14357 through r14358 into '.':
U compiler/symdef.pas
U compiler/fppu.pas

git-svn-id: branches/fixes_2_4@14364 -

Jonas Maebe 15 years ago
parent
commit
3af34c179e
2 changed files with 9 additions and 2 deletions
  1. 5 1
      compiler/fppu.pas
  2. 4 1
      compiler/symdef.pas

+ 5 - 1
compiler/fppu.pas

@@ -1094,7 +1094,11 @@ uses
            begin
              tstoredsymtable(globalsymtable).buildderef;
              derefdataintflen:=derefdata.size;
-           end;
+           end
+         else
+           { the unit may have been re-resolved, in which case the current
+             position in derefdata is not necessarily at the end }
+            derefdata.seek(derefdata.size);
          tstoredsymtable(globalsymtable).buildderefimpl;
          if (flags and uf_local_symtable)<>0 then
            begin

+ 4 - 1
compiler/symdef.pas

@@ -3316,7 +3316,10 @@ implementation
         else
           begin
             { safety }
-            funcretsym:=nil;
+            { Not safe! A unit may be reresolved after its interface has been
+              parsed but before its implementation has been parsed, and in that
+              case the funcretsym is still required!
+            funcretsym:=nil; }
           end;
       end;