public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/5774] New: some strtod() cases are wrong
@ 2008-02-19 21:40 aurelien at aurel32 dot net
  2008-02-19 21:41 ` [Bug libc/5774] " aurelien at aurel32 dot net
  2008-03-08 21:33 ` drepper at redhat dot com
  0 siblings, 2 replies; 4+ messages in thread
From: aurelien at aurel32 dot net @ 2008-02-19 21:40 UTC (permalink / raw)
  To: glibc-bugs

Observe the following code:

volta$ cat strtod-test.c
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
  double d;
  char *endp;
  char *s = argv[1];
  if (argc != 2)
  {
    printf("Usage: %s string\n", argv[0]);
    return 1;
  }
  d = strtod(s, &endp);
  printf("Got value %g, string tail %s\n", d, endp);
  return 0;
}

volta$ ./strtod-test 'Nan(anana)ana'
Got value nan, string tail )ana

According to ISO C99 7.20.1.3 para 3, the trailing ')' is also part of the 
expected form in the NAN(n-char-seq-opt). Therefore the result should be 'ana'.

-- 
           Summary: some strtod() cases are wrong
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=5774

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/5774] some strtod() cases are wrong
  2008-02-19 21:40 [Bug libc/5774] New: some strtod() cases are wrong aurelien at aurel32 dot net
@ 2008-02-19 21:41 ` aurelien at aurel32 dot net
  2008-03-08 21:33 ` drepper at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: aurelien at aurel32 dot net @ 2008-02-19 21:41 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-glibc at lists dot
                   |                            |debian dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=5774

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/5774] some strtod() cases are wrong
  2008-02-19 21:40 [Bug libc/5774] New: some strtod() cases are wrong aurelien at aurel32 dot net
  2008-02-19 21:41 ` [Bug libc/5774] " aurelien at aurel32 dot net
@ 2008-03-08 21:33 ` drepper at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2008-03-08 21:33 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2008-03-08 21:32 -------
Fixed on the trunk.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=5774

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/5774] some strtod() cases are wrong
       [not found] <bug-5774-131@http.sourceware.org/bugzilla/>
@ 2014-07-02  7:24 ` fweimer at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-07-02  7:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=5774

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-02  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-19 21:40 [Bug libc/5774] New: some strtod() cases are wrong aurelien at aurel32 dot net
2008-02-19 21:41 ` [Bug libc/5774] " aurelien at aurel32 dot net
2008-03-08 21:33 ` drepper at redhat dot com
     [not found] <bug-5774-131@http.sourceware.org/bugzilla/>
2014-07-02  7:24 ` fweimer at redhat dot com

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).