Check signed right shift behaviour at compile time
commitf08e5fb4637a46a15d83f8584d5eed44ee3e072f
authorOlly Betts <olly@survex.com>
Sat, 17 Dec 2016 07:42:27 +0000 (17 20:42 +1300)
committerOlly Betts <olly@survex.com>
Sat, 17 Dec 2016 07:42:27 +0000 (17 20:42 +1300)
treec7fdf7706872b224de491eba9805b0da45d7fc72
parentdc9c9ce72957a4b9642075b8470a56807e721254
Check signed right shift behaviour at compile time

We can use a test on a constant expression which should optimise away to
just the required version of the code, which means that on platforms
which perform sign-extension (pretty much everything current it seems)
we don't have to rely on the compiler optimising a portable idiom
correctly.
xapian-core/include/xapian/unicode.h