mailing list of musl libc
 help / color / mirror / code / Atom feed
* cluts - numeric test expectations
@ 2011-07-15  3:37 Rich Felker
  2011-07-15 11:44 ` Luka Marčetić
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Felker @ 2011-07-15  3:37 UTC (permalink / raw)
  To: musl

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


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

end of thread, other threads:[~2011-07-15 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15  3:37 cluts - numeric test expectations Rich Felker
2011-07-15 11:44 ` Luka Marčetić
2011-07-15 13:36   ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).