This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Use static initializers for constant variables in libm-test.inc
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Sat, 04 May 2013 17:42:21 +0200
- Subject: Re: Use static initializers for constant variables in libm-test.inc
- References: <Pine dot LNX dot 4 dot 64 dot 1305032107330 dot 30366 at digraph dot polyomino dot org dot uk>
On 05/03/2013 11:09 PM, Joseph S. Myers wrote:
libm-test.inc has various variables such as plus_infty and
min_subnorm_value that are used in tests and initialized dynamically
in the initialize function.
I guess this predates being able to be sure the compiler has built-in
functions such as __builtin_inf and __builtin_nan that can be used in
static initializers. But since GCC 3.3 such functions are available
(and, similarly, -0.0 in source code can be relied upon to produce a
negative constant zero, and various tests use that directly instead of
minus_zero).
Yes, when I wrote this GCC behaved a bit differently ;)
The patch is fine.
Thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126