On Sat, May 29, 2004 at 07:27:57PM -0700, Mark Fonnemann wrote:
does anyone know why round() does not work correctly in a C
program without
using the compiler flag "-std=c99". any program will compile correctly without
Because is a C99 fuynction
the glibc package in Fedora? i feel this is either a bug or something
that
should be documented in a man page somewhere.. and yes, to mention the obvious,
See the man page
"CONFORMING TO
C99."
i did #include <math.h> in my source and also compiled in gcc
with the -lm
option. thanks everyone...
Did you compile with -Wall -pedantic however ? If you turned lots of
warnings on you would have been warned about the lack of a prototype for
round() and known you needed one so that it knew the return type was
double.
Its marked "INVALID" in gcc bugs for good reasons.