This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [RFA] leb128.h: New file.


On Mon, May 21, 2012 at 10:08 AM, Ian Lance Taylor <iant@google.com> wrote:
> dje@google.com (Doug Evans) writes:
>
>> 2012-05-17 ?Doug Evans ?<dje@google.com>
>>
>> ? ? ? * leb128.h: New file.
>
> I'm not entirely sure about the use of int64_t to hold the result. ?Do
> we want to let this interface support larger types some day? ?E.g.,
> should the result be long long?
>
> I'll approve this patch, but think about it.
>
> The patch is not as portable as possible, but it will probably be OK in
> practice. ?You should deal with any issues that arise.

I'll change the result to size_t per Jan's request.
I'm kinda worried about putting people to extra effort when they
compile with -Wconversion which is why I went with int (thinking
people would rather just use an int).  But ok.

long long (+ unsigned long long) is ok by me.
I could also rename the functions to read_uleb128_to_ull (unsigned
long long) to allow for a day if/when someone wants
read_uleb128_to_uint64.  Ok?


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