This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/8] Apply LIT(x) to floating point literals in libm-test.c
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 18 May 2016 21:23:43 +0000
- Subject: Re: [PATCH 5/8] Apply LIT(x) to floating point literals in libm-test.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463599718 dot git dot murphyp at linux dot vnet dot ibm dot com> <dfeb4027547153931a89717c031ed691b9174a30 dot 1463599718 dot git dot murphyp at linux dot vnet dot ibm dot com>
On Wed, 18 May 2016, Paul E. Murphy wrote:
> + # If it doesn't have a period or an exponent, its not an FP literal.
> + if (index ($lit, ".") == -1 and $lit !~ /[pe]([+-])?[0-9]+/) {
> + return $lit;
This would interpret e.g. 0x1e2 as a floating-point literal. It looks
like we don't have such literals in libm-test.inc at present (we do have
0x1fffffe, which doesn't match your regular expression), but it still
seems too fragile.
--
Joseph S. Myers
joseph@codesourcery.com