Date: Thu, 14 Jul 2011 23:37:29 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: cluts - numeric test expectations I've been reviewing the numeric tests in cluts some more and based on discussions in the previous thread and on irc, here's where things seem to stand: Tests which expect strto* on "0x[junk]" to fail rather than returning 0 with endptr pointing at the 'x': both my interpretation of the standard and glibc agree that this expectation is wrong, as does at least one expert I asked. I think these should be changed to accept the current musl and glibc behavior and treat anything else as a failure. (Note that the scanf tests, however, seem to be fine.) Tests which expect *endptr==str after overflow (ERANGE): I believe this expectation is incorrect, but glibc seems to disagree. I can't find any language in the standard to support the behavior explicitly, or to allow it as an interpretation. The definition of "subject sequence" makes no reference to the value having to fit in a certain-size integer type, only that it belong to a clearly-defined regular language, e.g. /[-+]?(0x)?[[:xdigit:]]+/ for base==16. Otherwise, all the integer tests look okay. I still need to review the floating point ones. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.