Conflicting round() declaration only with g++-3.0
Hi,
When I try to compile tela with g++-3.0, it chokes on a redeclaration
of round() as below, but with g++-2.95 there is no warnong or error.
g++-3.0 -c -DLINUX=1 -DSTDC_HEADERS=1 -DRETSIGTYPE=void -DHAVE_ALLOCA_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PROCFS_H=1 -DHAVE_TIME_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_CLOCKS_PER_SEC=1 -DHAVE_IEEE754_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DTIMEVAL_HAS_USEC=1 -DHAVE_POPEN=1 -DHAVE_DRAND48=1 -DHAVE_RUSAGE=1 -DHAVE_SYSCONF=1 -DBROKEN_UCHAR_OUTPUTTER=1 -DHAVE_CDF=1 -I. -I./t -O lisp.C
In file included from object.H:12,
from symbol.H:12,
from tree.H:9,
from lisp.H:12,
from lisp.C:9:
def.H: In function `int round(double)':
def.H:211: new declaration `int round(double)'
/usr/include/bits/mathcalls.h:287: ambiguates old declaration `double
round(double)'
make: *** [lisp.o] Error 1
The declarations are from the tela source
inline int round(Treal x) {return (x < 0) ? (int)(x-0.5) : (int)(0.5+x);}
and from libc
/* Round X to nearest integral value, rounding halfway cases away from
zero. */
__MATHCALL (round,, (_Mdouble_ __x));
Actually I don't see the problem with these declarations. Can ayone
help?
I use g++-3.0 version 3.0-0pre010427 and g++-2.95 version
2.95.4-0.010506.
/Micce
--
Mikael Hedin, MSc +46 (0)980 79176
Swedish Institute of Space Physics +46 (0)8 344979 (home)
Box 812, S-981 28 KIRUNA, Sweden +46 (0)70 5891533 (mobile)
[gpg key fingerprint = 387F A8DB DC2A 50E3 FE26 30C4 5793 29D3 C01B 2A22]
Reply to: