This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 23 Apr 2014 23:54:11 +0200
- Subject: Re: [PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128
On Wed, 2014-04-23 at 22:29 +0200, Petr Machata wrote:
> How's this for a counter-proposal? I shamelessly reused your commit
> 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.