From: Eli Zaretskii <eliz@gnu.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Use %p conversion specifier to fix hppa compiler warning
Date: Mon, 13 Jun 2005 06:12:00 -0000 [thread overview]
Message-ID: <u1x767pl4.fsf@gnu.org> (raw)
In-Reply-To: <200506122102.j5CL2FPB002032@elgar.sibelius.xs4all.nl> (message from Mark Kettenis on Sun, 12 Jun 2005 23:02:15 +0200 (CEST))
> Date: Sun, 12 Jun 2005 23:02:15 +0200 (CEST)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>
> Currently the compiler warns about hppa_pointer_to_address_hack().
> Rather than adding ugly casts and making this an even worse hack, I
> propose to remove it completely in favour of using the %p format
> specifier.
>
> In the past we didn't use the %p conversion specifier since it wasn't
> portable; ancient UNIX didn't support it. However, I'm confident that
> we do not support those systems any more. I've done some archeology,
> and it seems %p is supported by Ultrix 4.0, HP-UX 10.01 and SunOS
> 4.1.3.
%p is ANSI/ISO C89, IIRC, so we can use it freely. The one problem
with it is that its results are inconsistent: some libraries produce
"0x" before the address, others don't. This is a minor inconsistency,
but with some numerical values, if you don't have the telltale "0x",
you may wonder whether the number is in hex or decimal.
next prev parent reply other threads:[~2005-06-13 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-12 21:02 Mark Kettenis
2005-06-13 6:12 ` Eli Zaretskii [this message]
2005-06-19 21:31 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1x767pl4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox