mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
There have been several recent complaints that << and >> don't behave the same way on all supported platforms. There is a risk that << overflows the signed integer type, which is undefined behavior, and there are platform-dependent behaviors from shifting by numbers of bits >= the bitwidth of the type, and also from shifting by negative values. Document this to warn unsuspecting users of these facts. Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAApHDvr0O6ZF8NO=Rq9Q+Sz=FHT=NZ1kkNTXZDcNph-OWuk7TQ@mail.gmail.com Backpatch-through: 14