Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750785AbWJLMiD (ORCPT ); Thu, 12 Oct 2006 08:38:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750810AbWJLMiD (ORCPT ); Thu, 12 Oct 2006 08:38:03 -0400 Received: from mailer.gwdg.de ([134.76.10.26]:58802 "EHLO mailer.gwdg.de") by vger.kernel.org with ESMTP id S1750785AbWJLMiB (ORCPT ); Thu, 12 Oct 2006 08:38:01 -0400 Date: Thu, 12 Oct 2006 14:33:53 +0200 (MEST) From: Jan Engelhardt To: Nikita Danilov cc: Andreas Schwab , "H. Peter Anvin" , torvalds@osdl.org, linux-kernel@vger.kernel.org, Al Viro Subject: Re: [PATCH] use %p for pointers In-Reply-To: <17710.12002.651934.995885@gargle.gargle.HOWL> Message-ID: References: <20061011145441.GB29920@ftp.linux.org.uk> <452D3BB6.8040200@zytor.com> <17710.8478.278820.595718@gargle.gargle.HOWL> <17710.12002.651934.995885@gargle.gargle.HOWL> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Report: Content analysis: 0.0 points, 6.0 required _SUMMARY_ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 898 Lines: 33 > > > man 3 printf: > > > > > > p The void * pointer argument is printed in hexadeci- > > > mal (as if by %#x or %#lx). > > > > > > so %p already has to output '0x', > > > > That is an detail of this particular implementation. > > > > > it's lib/vsprintf.c to blame for non-conforming behavior. > > > > The standard makes it completely implementation defined. > >Yes, but POSIX/SUS aside, at least we might make kernel version closer >to Linux user-level. I do agree. #include int main(void) { return printf("%p %p\n", main, NULL); } In glibc will print "0x7555562c (nil)" which seems ok enough. -`J' -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/