bug#1181: [uClibc]bug#1181: printf("%p") doesn't work correctly

Manuel Novoa III mjn3 at uclibc.org
Tue Jun 12 19:43:30 UTC 2001


On Tue, Jun 12, 2001 at 03:17:55AM -0700, David Schleef wrote:
> The following code snippet works differently in glibc than in
> uClibc.  It is unknown (to me) whether this behavior is defined
> by the standard or not.
>
> ---
> #include <stdio.h>
> 
> int main(void){
>         return printf("%p\n",(void *)0x1000);
> }
> ---
> 
> glibc output:
> 
> 0x1000
> 
> uClibc output:
> 
> 1000
> 

According to ANSI/IS 99 the output resulting from %p is
implementation-defined.   But glibc's output certainly
makes more sense here.  Easy enough to fix.  I'll take
care of it this afternoon.

Manuel






More information about the uClibc mailing list