fpc/tests/tbs/tb0676.pp
svenbarth 9d86fed95b * avoid range check error when using SwapEndian with 16-bit constants
+ added test

git-svn-id: trunk@46897 -
2020-09-19 17:04:17 +00:00

15 lines
263 B
ObjectPascal

{ %NORUN }
program tb0676;
{$warn 4110 error}
begin
SwapEndian(UInt16($1234));
SwapEndian(Int16($8765));
SwapEndian(UInt32($12345678));
SwapEndian(Int32($87654321));
SwapEndian(UInt64($1234567887654321));
SwapEndian(Int64($8765432112345678));
end.