Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/libm/src/s_exp2.c:346:15: error: 'twopk' may be used uninitialized in this function
On Mon, Oct 31, 2011 at 08:20:39PM +0000, Sad Clouds wrote:
> In function 'exp2': /opt/src/lib/libm/src/s_exp2.c:346:15: error:
> 'twopk' may be used uninitialized in this
> function /opt/src/lib/libm/src/s_exp2.c:346:15: note: 'twopk' was
> declared here /opt/src/lib/libm/src/s_exp2.c:346:22: error:
> 'twopkp1000' may be used uninitialized in this
> function /opt/src/lib/libm/src/s_exp2.c:346:22: note: 'twopkp1000' was
> declared here *** [s_exp2.o] Error code 1 nbmake: stopped
> in /opt/src/lib/libm 1 error
The warning is bogus, can you please try if making the common if expression
a local variable helps gcc to detect it?
Something like:
bool use_unscaled = k >= -1021 << 20;
and then use if (use_unscaled) ... in both places?
If that doesn't help, just initialize both variables to 0.0 at declaration.
Martin
Home |
Main Index |
Thread Index |
Old Index