Allow casts between long long and pointer types.

This applies to casts in executable code. Some casts in initializers still don't work.
This commit is contained in:
Stephen Heumann 2022-06-20 21:55:54 -05:00
parent 5e20e02d06
commit 15dc3a46c4
1 changed files with 2 additions and 2 deletions

View File

@ -2543,7 +2543,7 @@ else if tp^.kind = pointerType then begin
scalarType:
if expressionType^.baseType in
[cgByte,cgUByte,cgWord,cgUWord,cgLong,cgULong] then
[cgByte,cgUByte,cgWord,cgUWord,cgLong,cgULong,cgQuad,cgUQuad] then
Gen2(pc_cnv, ord(Unary(expressionType^.baseType)),
ord(cgULong))
else if doDispose then
@ -2564,7 +2564,7 @@ else if expressionType^.kind in [pointerType,arrayType] then begin
scalarType:
if tp^.baseType in
[cgByte,cgUByte,cgWord,cgUWord,cgLong,cgULong] then
[cgByte,cgUByte,cgWord,cgUWord,cgLong,cgULong,cgQuad,cgUQuad] then
Gen2(pc_cnv, ord(cgULong),
ord(Unary(tp^.baseType)))
else if tp^.baseType = cgVoid then