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: [RFC] convert a host address to a string


> Date: Thu, 8 Jan 2009 16:54:30 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> 
> > Well, the PRIxxx macros are ISO C99 inventions, so we can't assume
> > they're generally available.  Guess that could be mitigated by
> > importing inttypes module from gnulib.
> 
> It's mentioned in the C90 draft document that I have. Has it been
> removed from the final revision?

Are you sure you're looking at a C90 draft and not a C99 draft?

The draft linked from the Wikipedia page:

    http://flash-gordon.me.uk/ansi.c.txt

doesn't mention <inttypes.h> or the PRIxPTR define.  I'm fairly sure
they're not part of C90, since the uintptr_t typedef isn't either.

> In any case, it doesn't work on Windows, because their definition
> is screwed. How about some of my suggestions?

Actually, I think their defenition is ok (but nonstandard).  IIRC,
%I64x is the way to print the __int64 type that Microsoft invented
before long long was standardized by C99.  So it seems the problem
here is with gcc.

I'll reply to your origional mail to discuss your alternative suggestions.


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