[MPlayer-dev-eng] lrintf detection patch
Michael Niedermayer
michaelni at gmx.at
Fri May 20 22:54:46 CEST 2005
Hi
On Friday 20 May 2005 22:42, Rich Felker wrote:
> 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;
> }
hmm, why not something like
int main(int argc,char* argv[]){ return lrintf(atof(argv[1]));}
[...]
--
Michael
More information about the MPlayer-dev-eng
mailing list