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.


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.

Tom


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