Move ResolveForwardReference call to apply to the field being initialized.

This commit is contained in:
Stephen Heumann 2022-12-04 16:23:33 -06:00
parent 20770f388e
commit 36c70f9107
1 changed files with 2 additions and 2 deletions

View File

@ -2608,8 +2608,6 @@ var
maxDisp := disp;
lSuppressMacroExpansions := suppressMacroExpansions;
while true do begin
if (ip <> nil) and ip^.isForwardDeclared then
ResolveForwardReference(ip);
if token.kind = rbracech then {fill remainder with zeros}
goto 2;
hasNestedDesignator := false;
@ -2669,6 +2667,8 @@ var
if (ip = nil) or (ip^.itype^.size = 0) then
goto 2;
if ip^.isForwardDeclared then
ResolveForwardReference(ip);
disp := startingDisp + ip^.disp;
if ip^.bitsize <> 0 then begin {zero out padding bits in bitfields}
bfp := ip;