function GetDouble: double;type TpDoubleRec=packed record v1,v2:integer;end; PpDoubleRec = ^TpDoubleRec;var V:PpDoubleRec;begin v:=@result; V^.v1 := GetLong; V^.v2 := GetLong;end;
It's a bug yes. It's not handling the absolute reference to the implicit result variable correctly
The matter is not in the implicit result.
Quote from: tetrastes on March 21, 2023, 11:20:47 pmThe matter is not in the implicit result.It is. Your example shows the same thing just that d and result are getting coalesced or treated the same way.
type record case byte of 0: f64: double; 1: U64: UInt64; 2: {$ifdef ENDIAN_LITTLE} Hi: UInt32; Lo: UInt32; {$else} Lo: UInt32; Hi: UInt32; {$endif} end;
...In my code I do consider the BigEndian/LittleEndian cases properly but I wanted to make my example as small as possible.