This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Do not use const attribute for nan functions (bug 23277) [committed]
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 12 Jun 2018 20:15:45 +0200
- Subject: Re: Do not use const attribute for nan functions (bug 23277) [committed]
- References: <alpine.DEB.2.20.1806121657420.18047@digraph.polyomino.org.uk>
* Joseph Myers:
> +static int
> +do_test (void)
> +{
> + char buf[2] = { '2', 0 };
> + float a = nanf (buf);
> + buf[0] = '3';
> + float b = nanf (buf);
> + return memcmp (&a, &b, sizeof (float)) == 0;
> +}
By the way, there's TEST_COMPARE_BLOB now, which can simplify
debugging of test failures because the failure message includes the
blobs that differ.