[fpc-devel] Fix for SwapEndian
mschnell at lumino.de
Tue Apr 29 17:00:19 CEST 2008
>> I think shr is supposed to work sign-extending with signed types.
> The above statement may cause some confusion, so people who think that
> "shr" means "shift arithmetic right", please read the comment added to
They say: "SHR is /always/ unsigned in TP/FPC/Delphi."
This would mean that the patch the OP mentioned should not be necessary
(but obviously it is and so there seems to be some bug somewhere).
The stuff about first converting and then shifting seems quite queer
(unless the types left and right are different which imposes queer
behavior in C, too).
More information about the fpc-devel