[MPlayer-dev-eng] lrintf detection patch

Rich Felker dalias at aerifal.cx
Fri May 20 22:42:32 CEST 2005


On Fri, May 20, 2005 at 09:50:15PM +0200, Joerg Sonnenberger wrote:
> Hi all,
> the default CFLAGS settings include -ffast-math and GCC 3.4.3 therefore
> optimizes the lrintf call in the test away, effectively turning it into
> a NOP. The attached patch forces -ffast-math of for this test.

IMO a compiler could still optimize it away with intrinsics. :(
Try something like:

int main(void) { long (*foo)(double); foo = lrintf; (void)foo(); return 0; }

Rich




More information about the MPlayer-dev-eng mailing list