This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] soft-fp: Fix used without set warning in _FP_MUL and_FP_DIV
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at sourceware dot org
- Date: Fri, 07 Dec 2012 13:27:26 -0600
- Subject: Re: [PATCH] soft-fp: Fix used without set warning in _FP_MUL and_FP_DIV
- References: <1354907985-14082-1-git-send-email-rth@twiddle.net>
On 2012-12-07 13:19, Richard Henderson wrote:
> Seen in, e.g. ports/sysdeps/alpha/soft-fp/ots_mul.c.
>
> The problem here is we have a switch on the class of X*Y, followed by
> a switch on the class of R. The exponent field of R really is not set
> by the first switch for NaN outputs, because we know it's not going to
> be used. The compiler is not smart enough to see through this.
>
> By pulling the exponent computation out of the NORMAL*NORMAL path, we
> will not be pessimizing the most common case, while still providing an
> arbitrary value to satisfy the compiler.
I should mention that with this fixed, the only warnings in an Alpha build
(with gcc 4.8.0 20121121) are the generic set[gu]id unused return value ones.
r~