From: pavenis AT lanet DOT lv Message-ID: To: djgpp-workers AT delorie DOT com Date: Sat, 31 Jul 1999 15:31:31 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: sscanf() format %p seems to be broken X-mailer: Pegasus Mail for Win32 (v3.11) Reply-To: djgpp-workers AT delorie DOT com 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 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