This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
> boundaries.

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]