From 15dc3a46c485e3cc470f92c6ecf8b5015a5e4b29 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 20 Jun 2022 21:55:54 -0500 Subject: [PATCH] Allow casts between long long and pointer types. This applies to casts in executable code. Some casts in initializers still don't work. --- Expression.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Expression.pas b/Expression.pas index 1b9e479..75f1372 100644 --- a/Expression.pas +++ b/Expression.pas @@ -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