Adriaan van Os wrote on Tue, 19 May 2015:
Section 6.5.7. But in that standard the behaviour is undefined also when "the value of the right operand is greater than or equal to the width of the promoted left operand", which I think is a bit too simplistic (since, if we start talking about the maximum number of bits that can "legally" be shifted, then that number depends on the actual value of the left operand,
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.
Jonas _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
