mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-23 04:30:27 +00:00
When initializing bitfields of type long, do not treat their values as pointer constants.
This was inappropriate and would lead to memory trashing. Fixes case 3 in issue #59.
This commit is contained in:
parent
ae6de310c7
commit
9030052616
@ -2015,8 +2015,9 @@ var
|
||||
2: DisposeTree(initializerTree);
|
||||
end {if}
|
||||
else begin
|
||||
if (tp^.kind = pointerType)
|
||||
or ((tp^.kind = scalarType) and (tp^.baseType in [cgLong,cgULong]))
|
||||
if ((tp^.kind = pointerType)
|
||||
or ((tp^.kind = scalarType) and (tp^.baseType in [cgLong,cgULong])))
|
||||
and (bitsize = 0)
|
||||
then begin
|
||||
iPtr^.iType := ccPointer;
|
||||
if variable^.storage in [external,global,private] then begin
|
||||
|
Loading…
x
Reference in New Issue
Block a user