This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.


On Thu, May 23, 2013 at 7:01 AM, Tom Tromey <tromey@redhat.com> wrote:
> Pedro>  #1 - Use inttypes.h format specifiers
> Pedro>       PRId16/PRId32/PRIu16/PRIu32/PRIx16/PRIx32 etc.  We import
> Pedro>       inttypes from gnulib, so these are always available.
>
> I find these pretty incomprehensible, but I would adapt.
> One virtue of using these is that they are standard; and the more
> standard the code is, the less newcomers have to learn.
>
> Pedro>  #2 - plongest/pulongest, and let the compiler zero/sign extend.
> Pedro>       For hex printing use phex/phex_nz.
>
> This is my preference, I think primarily due to parsimony.
> In this case, for me, that outweighs the standards-based argument,
> because the overhead of learning about pulongest is low.

It's not obvious to me to use pulongest to print uint32_t,
so if y'all are willing to let me check in a patch that is otherwise obvious
but happens to not use pulongest ... "works for me".
['cus I can't promise to keep this one in cache]


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