This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/33177] Wrong result from nint() on Cygwin



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]