This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10721] New: strverscmp : manual versus library


There seems to be a bug either in the manual (Version 2.8, edition 0,12,
page 88) or in the library routine (GCC 4.2.4) for the routine strverscmp().
The manual states for fractional/fractional comparisions : "If a common prefix
contains only leading zeros the longest part is less than the other one ; ..."

So : strverscmp("00","0") returns -1 (OK)
     strverscmp("00",""001") returns -1 (OK)
     strverscmp("00","010") returns -1 (not OK ?)
     strverscmp("00","0100") returns -1 (not OK ?)
The last two examples certainly have one prefix '0' in common ... or don't they ?
Do I misundestand the wording of the manual ?

-- 
           Summary: strverscmp : manual versus library
           Product: glibc
           Version: 2.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: lucien at haijen dot be
                CC: glibc-bugs at sources dot redhat dot com


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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]