Mail Archives: djgpp-workers/2001/07/23/10:44:31
GCC 3.0 development version is complaining about some things that GCC
2.7.2.1 accepted (with same compiler options). Here is one I can't
figure out:
gcc -g -O2 -W -Wall -Werror -march=i386 -I/usr/include -c tarm.c
cc1.exe: warnings being treated as errors
tarm.c: In function `tarm':
tarm.c:58: warning: operation on `dsqrarg' may be undefined
tarm.c:58: warning: operation on `dsqrarg' may be undefined
make.exe: *** [tarm.o] Error 1
This is from compilation of a larger program; I can reproduce the error
with this trimmed version:
static double dsqrarg;
#define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)
int main(void)
{
int xi,yj;
double pxi,pyj,txy;
pxi=pyj=0.25;
xi=yj=1;
txy = (xi == yj ? DSQR(pxi) : DSQR(pxi) + DSQR(pyj));
return 0;
}
Any ideas?
TIA/jtw
Tools:
DOS 5.0
djdev 2.03 (stock, not CVS)
bnu-2.11.2
gcc-3.0 GCC 3.0 C compiler binaries for DJGPP (WARNING: development version)
- Raw text -