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: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 22 May 2013 08:57:18 -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>
On Wed, May 22, 2013 at 2:43 AM, Pedro Alves <palves@redhat.com> wrote:
> On 05/22/2013 12:35 AM, Doug Evans wrote:
>> On Tue, May 21, 2013 at 1:34 PM, Pedro Alves <palves@redhat.com> wrote:
>>> Use pulongest rather than PRIu32, so that the translatable format
>>> string does not depend on host.
>
> ...
>
>> Lovely.
>> Although having to remember to use pulongest to print uint32_t sounds
>> like a never ending series of headaches.
>
> Hmm. Grepping for PRIu in src/intl/ finds lots of hits. Looks like
> gettext is doing some magic to deal with these. There's still the
> issue with the fact that we use gnulib's inttypes.h replacement for
> systems that don't have it, and it's possible gettext's replacements
> don't match gnulib's... But I'm willing to ignore that.
>
> WDYT?
If it's doable, I'd prefer this to pulongest.
Another possibility, mentioned for reference sake, would be adding puint32, etc.
I'm ambivalent on what The Right fix is here.