https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68743

--- Comment #17 from dave.anglin at bell dot net ---
On 2015-12-13, at 1:36 PM, sgk at troutmask dot apl.washington.edu wrote:

> If gcc is doing an optimization that changes (float)floor(x) to
> __builtin_floorf() and then __builtin_floorf() is mapped to libm's
> floorf(), then that optimization is broken if it is not guarded
> by a HAVE_FLOORF macro.

That is exactly what appears to happen.  There doesn't appear to be any
configure test
for floorf.

>  I'm not an expert on the nuances of the
> C standard, but it would that a libm could have 
> 
> #define floorf(x)       ((float)floor((double)(x))
> 
> in math.h.

I agree.

>  Perhaps, adding a few pessimizations will prevent gcc
> from doing the optimization.

Will give these a whirl.

Dave
--
John David Anglin       dave.ang...@bell.net

Reply via email to