This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33177] Wrong result from nint() on Cygwin
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2007 16:17:31 -0000
- Subject: [Bug target/33177] Wrong result from nint() on Cygwin
- References: <bug-33177-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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