glibc/stdlib
Joseph Myers 4725d33eed Make strtod raise "inexact" exceptions (bug 19380).
The strtod function should raise the "inexact" exception when its
result is inexact, but fails to do so except in the case of underflow
or overflow.  This patch fixes it to do so for all inexact results.

tst-strtod-round is extended to test for this exception; the generator
is fixed to properly mark inexact results as such in the case where
the inexactness is from the mpfr_subnormalize step.

Tested for x86_64, x86 and powerpc.

	[BZ #19380]
	* stdlib/strtod_l.c (round_and_return): Force "inexact" exception
	for inexact results.
	* stdlib/gen-tst-strtod-round.c (string_to_fp): Return indication
	of inexact result where mpfr_subnormalize is the only inexact
	step.
	* stdlib/tst-strtod-round-data.h: Regenerated.
	* stdlib/tst-strtod-round-skeleton.c [!FE_INEXACT] (FE_INEXACT):
	Define to 0.
	(GEN_ONE_TEST): Test inexact exceptions raised are as expected.
2016-10-28 00:40:23 +00:00
..
bits Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
sys
Depend
Makefile Add tests for strfrom functions 2016-10-25 17:11:53 -02:00
Versions Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
a64l.c
abort.c
abs.c
add_n.c
addmul_1.c
alloca.h
at_quick_exit.c
atexit.c
atof.c
atoi.c
atol.c
atoll.c
bsearch.c
bug-fmtmsg1.c
bug-getcontext.c
bug-strtod.c Refactor strtod tests 2016-10-25 17:05:47 -02:00
bug-strtod2.c Refactor strtod tests 2016-10-25 17:05:47 -02:00
canonicalize.c
cmp.c
cxa_at_quick_exit.c
cxa_atexit.c
cxa_finalize.c
cxa_thread_atexit_impl.c
dbl2mpn.c
div.c
divmod_1.c
divrem.c
drand48-iter.c
drand48.c
drand48_r.c
erand48.c
erand48_r.c
errno.h
exit.c Bug 20198: quick_exit should not call destructors. 2016-06-06 21:40:25 -04:00
exit.h Bug 20198: quick_exit should not call destructors. 2016-06-06 21:40:25 -04:00
fmtmsg.c
fmtmsg.h
fpioconst.c
fpioconst.h
gen-fpioconst.c
gen-tst-strtod-round.c Make strtod raise "inexact" exceptions (bug 19380). 2016-10-28 00:40:23 +00:00
getcontext.c
getenv.c
getsubopt.c
gmp-impl.h
gmp.h
grouping.c
grouping.h
groupingwc.c
inlines.c
isomac.c
jrand48.c
jrand48_r.c
l64a.c
labs.c
lcong48.c
lcong48_r.c
ldbl2mpn.c
ldiv.c
llabs.c
lldiv.c
longlong.h longlong: fix sh -Wundef builds 2016-01-07 17:29:17 -05:00
lrand48.c
lrand48_r.c
lshift.c
makecontext.c
mblen.c
mbstowcs.c
mbtowc.c
mod_1.c
monetary.h
mp_clz_tab.c
mpn2dbl.c
mpn2flt.c
mpn2ldbl.c
mrand48.c
mrand48_r.c
msort.c
mul.c
mul_1.c
mul_n.c
nrand48.c
nrand48_r.c
old_atexit.c
on_exit.c
putenv.c
qsort.c
quick_exit.c Bug 20198: quick_exit should not call destructors. 2016-06-06 21:40:25 -04:00
rand.c
rand_r.c
random.c
random_r.c
rpmatch.c
rshift.c Fix build failures with -DDEBUG. 2016-01-15 11:07:41 -07:00
secure-getenv.c
seed48.c
seed48_r.c
setcontext.c
setenv.c Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses 2016-04-15 13:30:55 +02:00
srand48.c
srand48_r.c
stdlib.h Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
strfmon.c
strfmon_l.c libio: Implement vtable verification [BZ #20191] 2016-06-23 20:01:52 +02:00
strfrom-skeleton.c Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
strfromd.c Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
strfromf.c Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
strfroml.c Add strfromd, strfromf, and strfroml functions 2016-10-25 17:03:54 -02:00
strtod.c
strtod_l.c Make strtod raise "inexact" exceptions (bug 19380). 2016-10-28 00:40:23 +00:00
strtod_nan.c
strtod_nan_double.h
strtod_nan_float.h
strtod_nan_main.c
strtod_nan_narrow.h
strtod_nan_wide.h
strtof.c
strtof_l.c
strtof_nan.c
strtoimax.c
strtol.c
strtol_l.c
strtold.c
strtold_l.c
strtold_nan.c
strtoll.c
strtoll_l.c
strtoul.c
strtoul_l.c
strtoull.c
strtoull_l.c
strtoumax.c
sub_n.c
submul_1.c
swapcontext.c
system.c
tens_in_limb.c
test-a64l.c
test-canon.c
test-canon2.c
testdiv.c
testdiv.input
testmb.c
testmb2.c
testrand.c
testsort.c
tst-atof1.c
tst-atof2.c
tst-bsearch.c
tst-environ.c
tst-fmtmsg.c
tst-fmtmsg.sh Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
tst-limits.c
tst-makecontext.c
tst-makecontext2.c
tst-makecontext3.c
tst-putenv.c
tst-putenvmod.c
tst-qsort.c
tst-qsort2.c
tst-quick_exit.cc quick_exit tests: Do not use C++ headers 2016-06-09 12:09:43 +02:00
tst-rand48-2.c
tst-rand48.c
tst-random.c
tst-random2.c
tst-secure-getenv.c
tst-setcontext.c
tst-setcontext2.c
tst-setcontext3.c
tst-setcontext3.sh Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
tst-strfmon_l.c strfmon_l: Use specified locale for number formatting [BZ #19633] 2016-04-04 15:18:13 +02:00
tst-strfrom-locale.c Add tests for strfrom functions 2016-10-25 17:11:53 -02:00
tst-strfrom.c Add tests for strfrom functions 2016-10-25 17:11:53 -02:00
tst-strfrom.h Add tests for strfrom functions 2016-10-25 17:11:53 -02:00
tst-strtod-nan-locale-main.c
tst-strtod-nan-locale.c
tst-strtod-overflow.c
tst-strtod-round-data
tst-strtod-round-data.h Make strtod raise "inexact" exceptions (bug 19380). 2016-10-28 00:40:23 +00:00
tst-strtod-round-skeleton.c Make strtod raise "inexact" exceptions (bug 19380). 2016-10-28 00:40:23 +00:00
tst-strtod-round.c Add tst-wcstod-round 2016-08-19 11:17:07 -05:00
tst-strtod-underflow.c
tst-strtod.c
tst-strtod.h Refactor strtod tests 2016-10-25 17:05:47 -02:00
tst-strtod2.c
tst-strtod3.c
tst-strtod4.c
tst-strtod5.c
tst-strtod6.c Refactor strtod tests 2016-10-25 17:05:47 -02:00
tst-strtol-locale-main.c
tst-strtol-locale.c
tst-strtol.c
tst-strtoll.c
tst-system.c
tst-thread-quick_exit.cc quick_exit tests: Do not use C++ headers 2016-06-09 12:09:43 +02:00
tst-tininess.c
tst-tls-atexit-lib.c
tst-tls-atexit-nodelete.c
tst-tls-atexit.c
tst-unsetenv1.c
tst-width-stdint.c Add <stdint.h> integer width macros. 2016-09-21 17:06:36 +00:00
tst-width.c Add <limits.h> integer width macros. 2016-09-19 12:25:36 +00:00
tst-xpg-basename.c
ucontext.h
udiv_qrnnd.c
wcstoimax.c
wcstombs.c
wcstoumax.c
wctomb.c
xpg_basename.c