public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use %p for pointers
Date: Wed, 11 Oct 2006 12:16:22 -0700	[thread overview]
Message-ID: <452D4306.3040407@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0610112112450.9822@yvahk01.tjqt.qr>

Jan Engelhardt wrote:
>>> %p will do no such thing in the kernel.  As for the difference...  %x
>>> might happen to work on some architectures (where sizeof(void
>>> *)==sizeof(int)),
>>> but it's not portable _and_ not right.  %p is proper C for that...
> 
> Ah I see your point, but then again, %lx could have been used. Unless 
> there is some arch where sizeof(long) != sizeof(void *).

That really makes gcc bitch, *and* it's wrong for a whole bunch of reasons.

>> It's really too bad gcc bitches about %#p, because that's arguably The Right
>> Thing.
> 
> ack. Make a bug report perhaps?

Maybe.  They'll probably say "the C standard says so" :-/

	-hpa


  reply	other threads:[~2006-10-11 19:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-10 21:49 [PATCH] use %p for pointers Al Viro
2006-10-10 21:58 ` David Miller
2006-10-11 11:16 ` Jan Engelhardt
2006-10-11 14:54   ` Al Viro
2006-10-11 18:45     ` H. Peter Anvin
2006-10-11 19:13       ` Jan Engelhardt
2006-10-11 19:16         ` H. Peter Anvin [this message]
2006-10-11 19:28           ` Jan Engelhardt
2006-10-11 20:28       ` Jakub Jelinek
2006-10-11 20:39         ` H. Peter Anvin
2006-10-12 11:03       ` Nikita Danilov
2006-10-12 11:49         ` Andreas Schwab
2006-10-12 12:02           ` Nikita Danilov
2006-10-12 12:33             ` Jan Engelhardt
2006-10-15 15:39         ` Jan Engelhardt

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=452D4306.3040407@zytor.com \
    --to=hpa@zytor.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /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