[Bug target/33177] Wrong result from nint() on Cygwin
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Aug 24 16:17:00 GMT 2007
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-08-24 16:17 -------
This is a cygwin bug:
$ cat a.c
#include <math.h>
#include <stdio.h>
int main (void) {
float x = 0.7;
int i = (int) lroundf (x);
printf ("%d\n", i);
}
$ gcc a.c && ./a.exe
0
I you replace lroundf() with lround(), it works. Bugreport sent to the
appropriate cygwin mailing-list:
http://cygwin.com/ml/cygwin/2007-08/msg00641.html
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Component|fortran |target
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33177
More information about the Gcc-bugs
mailing list