Jonas Maebe wrote:
No, it does not. It only depends on the type. Shifting an uint32_t with value 1 right by 32 bits is undefined. Shifting an uint64_t with value 1 right by 32 bits is 0.
As I said, this is absurd, as so many other de-facto bad habits in computing. There should be no difference between shifting a value (of any type) right by N bits or shifting the same value (of the same type) N-times right by 1 bit. That is not a matter of type but of simple logic.
But, of course, I understand that CPUs implement it wrong and that the compilers writers want to be compatible with the CPU doing it wrong. That is probably the most practical solution. But that doesn't make it less ludicrous.
Regards, Adriaan van Os _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
