Closed agnat closed 9 years ago
This is work in progress. Do not merge until further notice. ;)
I doubt any reasonable C++ compiler actually implements arithmetic shifting. In combination with promotion to signed integers (bitwise or, &c.) it's just to dangerous ... and never what you want. But I'm not an expert in these things...
If you do
int32_t x = 0xff000000;
x = x >> 24;
then it actually performs an arithmetic shift (the result is 0xffffffff), so I really don't know what's going on.
Hehe, that's why it's called "implementation defined behavior" :P
I'm also pretty sure the literal 0xff000000
is actually an unsigned... anyway...
Then I guess we'll never now :D
Ready for review.
@dylanmckay, could you look into adding the other fixups around here?
The PR looks really nice! (it also makes me realise how much cleaner my switch
statements would look if I condensed them up :P).
If you want to roll the PR into one or two commits, I'll merge :)
Squashed.
I'll work on the fixup code tomorrow.
hi5(...)
et al ;)