All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use %p for pointers
Date: Wed, 11 Oct 2006 13:39:06 -0700	[thread overview]
Message-ID: <452D566A.50705@zytor.com> (raw)
In-Reply-To: <20061011202814.GD20982@devserv.devel.redhat.com>

Jakub Jelinek wrote:
> On Wed, Oct 11, 2006 at 11:45:10AM -0700, H. Peter Anvin wrote:
>> Al Viro 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...
>> It's really too bad gcc bitches about %#p, because that's arguably The 
>> Right Thing.
> 
> It is correct that gcc warns about %#p, that invokes undefined behavior
> in ISO C99.
> 

Yes, it's a bug in the standard.

	-hpa


  reply	other threads:[~2006-10-11 20:39 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
2006-10-11 19:28           ` Jan Engelhardt
2006-10-11 20:28       ` Jakub Jelinek
2006-10-11 20:39         ` H. Peter Anvin [this message]
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=452D566A.50705@zytor.com \
    --to=hpa@zytor.com \
    --cc=jakub@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.