This is the mail archive of the
mailing list for the GCC project.
Re: Floating point to int casts
> Since there need be no performance loss in sticking to standard
> C99, as discussed here within the last month, you should use
> lrint(), which has already a macro version in glibc
> <bits/mathinline.h> looking much like yours. I think Honza
> mentioned the possibility of building it into gcc rather than
> depending on the library, and I don't recall any objections. Now
> it may be too late for gcc-3.1.
I don't think it is. gcc-3.1 is frozen for big mergers of branches,
but conservatively extending existing backend is possible.
The questional thing is whether doing so is really usefull, as the only
benefit is the scheduling that is prety poor for x87 anyway and how
to distinquish it from the real truncation in the internal reprezentaiton.