Re: printf-safe checks of invalid long double values

2014-12-10 Thread Pádraig Brady
On 28/11/14 15:57, Paul Eggert wrote: > Pádraig Brady wrote: > >> 3. Since glibc no longer crashes, and no-one has complained about >> these edge cases of invalid numbers, just avoid this replacement altogether >> but push for the improvement to output "nan" in these cases in glibc. > > Thanks, I

Re: printf-safe checks of invalid long double values

2014-11-28 Thread Pádraig Brady
On 28/11/14 15:57, Paul Eggert wrote: > Pádraig Brady wrote: > >> 1. Include the snprintf-posix gnulib module to fix this od issue, >> (but that would also use the replacement code in many more cases). >> >> 2. Adjust gnulib's ftoastr() to use the lower level vasnprintf-posix. >> That would work,

Re: printf-safe checks of invalid long double values

2014-11-28 Thread Paul Eggert
Pádraig Brady wrote: 3. Since glibc no longer crashes, and no-one has complained about these edge cases of invalid numbers, just avoid this replacement altogether but push for the improvement to output "nan" in these cases in glibc. Thanks, I like this option the best.

Re: printf-safe checks of invalid long double values

2014-11-28 Thread Pádraig Brady
On 28/11/14 13:32, Ondřej Bílka wrote: > On Thu, Nov 27, 2014 at 08:37:59PM -0800, Paul Eggert wrote: >> Pádraig Brady wrote: >>> Are these checks backed up by corresponding replacement code? >>> Are these checks correct? >>> Why has glibc not been updated in the 7 years since the checks were

Re: printf-safe checks of invalid long double values

2014-11-28 Thread Pádraig Brady
On 28/11/14 04:37, Paul Eggert wrote: > Pádraig Brady wrote: >>Are these checks backed up by corresponding replacement code? >>Are these checks correct? >>Why has glibc not been updated in the 7 years since the checks were added? > > As I recall, this comes from an old dispute about wh

Re: printf-safe checks of invalid long double values

2014-11-28 Thread Ondřej Bílka
On Thu, Nov 27, 2014 at 08:37:59PM -0800, Paul Eggert wrote: > Pádraig Brady wrote: > > Are these checks backed up by corresponding replacement code? > > Are these checks correct? > > Why has glibc not been updated in the 7 years since the checks were added? > > As I recall, this comes from

Re: printf-safe checks of invalid long double values

2014-11-27 Thread Paul Eggert
Pádraig Brady wrote: Are these checks backed up by corresponding replacement code? Are these checks correct? Why has glibc not been updated in the 7 years since the checks were added? As I recall, this comes from an old dispute about what glibc should do when asked to print floating-p

printf-safe checks of invalid long double values

2014-11-27 Thread Pádraig Brady
I noticed that vfprintf() was replaced on my glibc-2.20 system, which is surprising and a lot of code to be duplicating. This gets pulled in because: $ grep gl_cv_func_printf.*=no config.log gl_cv_func_printf_infinite_long_double=no $ grep -A5 "checking.*infinite 'long double' arguments" conf