Do not enter forward-declared struct parameters in the global symbol table.

Memory for them is still allocated from the global pool, to ensure they remain available for as long as the function prototype that references them.

This addresses one of the problems mentioned in issue #53.
This commit is contained in:
Stephen Heumann 2018-03-06 19:46:51 -06:00
parent 78db036a85
commit 96f04b168e

View File

@ -1342,7 +1342,6 @@ if space <> fieldListSpace then begin {are we defining a function?}
end {if}
else if (itype^.kind in [structType,unionType]) and (itype^.fieldList = nil)
and doingParameters then begin
isGlobal := true;
useGlobalPool := true;
end; {else if}
if noDeclarations then begin {if we need a symbol table, create it}