mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-01 09:41:39 +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);
|
2: DisposeTree(initializerTree);
|
||||||
end {if}
|
end {if}
|
||||||
else begin
|
else begin
|
||||||
if (tp^.kind = pointerType)
|
if ((tp^.kind = pointerType)
|
||||||
or ((tp^.kind = scalarType) and (tp^.baseType in [cgLong,cgULong]))
|
or ((tp^.kind = scalarType) and (tp^.baseType in [cgLong,cgULong])))
|
||||||
|
and (bitsize = 0)
|
||||||
then begin
|
then begin
|
||||||
iPtr^.iType := ccPointer;
|
iPtr^.iType := ccPointer;
|
||||||
if variable^.storage in [external,global,private] then begin
|
if variable^.storage in [external,global,private] then begin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user