This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix parameter type in C++ version of iseqsig (bug 23171)
On Mon, 14 May 2018, Gabriel F. T. Gomes wrote:
> On Mon, 14 May 2018, Gabriel F. T. Gomes wrote:
>
> >mistakenly used double parameters in the long double version of iseqsig,
> >thus causing spurious conversions to double, as reported on bug 23171.
>
> By the way, is there any kind of test, which could be added to the test
> suite, and that would have detected such spurious conversions?
I would guess something like
volatile long double a = LDBL_MAX;
volatile long double b = nextdownl (a);
/* Then test a and b do not compare equal with iseqsig. */
(not tested that this does indeed fail before and pass after the fix when
compiled as C++ on a platform where long double is wider than double).
--
Joseph S. Myers
joseph@codesourcery.com