Mail Archives: djgpp-workers/1999/07/31/09:05:26
Below is slightly editted test (I only removed #include "confdefs.h")
from gcc-2.95 configure which tries to detect whether printf
supports format %p. With 28 July CVS version of libc.a this test
fails.
Andris
-----------------------------
#include <stdio.h>
main()
{
char buf[64];
char *p = buf, *q = NULL;
sprintf(buf, "%p", p);
sscanf(buf, "%p", &q);
exit (p != q);
}
-----------------------------
main () at xxx.c:6
6 char *p = buf, *q = NULL;
(gdb) n
7 sprintf(buf, "%p", p);
(gdb) n
8 sscanf(buf, "%p", &q);
(gdb) n
9 exit (p != q);
(gdb) p p
$1 = 0x908c4 "908c4"
(gdb) p q
$2 = 0x38c ""
(gdb) q
- Raw text -