From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24005 invoked by alias); 10 Apr 2007 21:22:19 -0000 Received: (qmail 23977 invoked by uid 48); 10 Apr 2007 21:22:10 -0000 Date: Tue, 10 Apr 2007 21:22:00 -0000 From: "madcoder at debian dot org" To: glibc-bugs@sources.redhat.com Message-ID: <20070410222210.4342.madcoder@debian.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/4342] New: scanf %lg problem with hex numbers X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00026.txt.bz2 scanf makes exponents specifiers mandatory whereas it should not. The code to reproduce the problem is: #include int main (void) { double d = -999; int ret; ret = sscanf ("0x100", "%lg", &d); printf ("%d %g\n", ret, d); ret = sscanf ("0x100p0", "%lg", &d); printf ("%d %g\n", ret, d); return 0; } expected output would be: 1 256 1 256 it gives currently: 0 -999 1 256 -- Summary: scanf %lg problem with hex numbers Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper at redhat dot com ReportedBy: madcoder at debian dot org CC: glibc-bugs at sources dot redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=4342 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.