build error (3)

Andrew Haley aph@redhat.com
Fri Dec 1 03:07:00 GMT 2000


Oskar Liljeblad writes:
 > For some reason I thought I had compiled gcj with a stable gcc, but
 > I hadn't. That's the reason behind my last "build error" mail.
 > 
 > This time I got some warnings about different declarations when building
 > libgcj. The error appears when compiling libjava/java/lang/natMath.cc
 > with c++:
 > 
 > ../../../libgcj-snapshot-2000-11-23/libjava/java/lang/fdlibm.h:58: declaration 
 >    of `double acos(double)' throws different exceptions
 > /usr/include/bits/mathcalls.h:54: than previous declaration `double 
 >    acos(double) throw ()'

This is odd.  We really don't want to be including
/usr/include/bits/mathcalls.h.  It looks to me like it's probably
pulled in when we include stdio.h, but I can see absolutely no good
reason why we need that.  Maybe it's included via stdlib.h.

Can you try without the #include <stdio.h> ?

Right now I can't see what all the #includes are for.  There's a call
to memset(), but if that's the only reason we can find some other way
to zero the memory.

This is always going to be tricky because we're providing new versions
of standard C library routines with the same names, so unless we're
extremely careful this sort of thing will happen.

Andrew.


More information about the Java mailing list