This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
- From: Doug Evans <dje at google dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 23 May 2013 09:14:42 -0700
- Subject: Re: [PATCH] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
- References: <20130521203421 dot 23721 dot 93618 dot stgit at brno dot lan> <CADPb22TzeQEanUGOMcFBJrStDYkk5zRUE2Fht_c_d5mQAYM7sw at mail dot gmail dot com> <519C932E dot 7000601 at redhat dot com> <CADPb22S0sYeTv+9_gsNO=3axHabLjgtwuyuNpyniLUfwwv9aCQ at mail dot gmail dot com> <519CEDF9 dot 7060000 at redhat dot com> <CADPb22Tw2b788uihCJjjnmKKGjgm525vmpThMzEHZ0fpSTqgzw at mail dot gmail dot com> <20130523055353 dot GC4017 at adacore dot com> <519E0484 dot 9040103 at redhat dot com>
On Thu, May 23, 2013 at 4:59 AM, Pedro Alves <palves@redhat.com> wrote:
> On 05/23/2013 06:53 AM, Joel Brobecker wrote:
>>> I don't mind much how it's implemented. Remembering that there is
>>> puint32 for the purpose of printing uint32's will stick in my memory
>>> more than having to use pulongest.
>>
>> 'cannot believe I am saying this, but how about a puint32 macro
>> that just renames pulongest?
>
> If we ignore implementation details, can I take it you'd prefer
> the puint32 direction then?
>
> That means moving in the direction of ending up with
> puint8,puint16,puint32,puint64,pint8,pint16,pint32,pint64,
> pxint8,pxint16,pxint32,pxint64,etc.,etc.., right?
> Essentially, inttypes.h done differently.
[filed for reference sake]
I'd drop the 8 and 16 versions and just %d/%u.
[We can and do assume ints are not < 32 bits, and thus 8/16 will get promoted.]