public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "madcoder at debian dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/4342] New: scanf %lg problem with hex numbers Date: Tue, 10 Apr 2007 21:22:00 -0000 [thread overview] Message-ID: <20070410222210.4342.madcoder@debian.org> (raw) scanf makes exponents specifiers mandatory whereas it should not. The code to reproduce the problem is: #include <stdio.h> 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.
next reply other threads:[~2007-04-10 21:22 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-04-10 21:22 madcoder at debian dot org [this message] 2007-04-23 12:45 ` [Bug libc/4342] " jakub at redhat dot com 2007-04-27 19:29 ` drepper at redhat dot com 2007-07-12 15:14 ` cvs-commit at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070410222210.4342.madcoder@debian.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).