On Wed, 2014-04-23 at 22:29 +0200, Petr Machata wrote:
How's this for a counter-proposal? I shamelessly reused your
message and ChangeLog wording, please let me know if that's overstepping
No it isn't. And thanks for the proposal.
But I think I prefer the fix using multiplication as posted here:
That one is also just a oneliner and more generic since it doesn't rely
on having to cast to uint64_t. And Richard checked it still just
generates a shift.
You are right that we don't really need the generic version, but just a
int64_t one. But if we make it non-generic than I think we should go all
the way and also do the other cleanups suggested to get rid of the
typeofs and just use the 64bit types everywhere (and maybe inline or
undef the macro). But please don't feel you need to clean it all up and
"ungenericize" it all. That would be nice, but the main thing is that we
get rid of the undefined behavior.