Bug on Solaris
Wed Jan 9 08:11:00 GMT 2002
On Wed, Jan 09, 2002 at 10:44:47AM -0500, Jeff Sturm wrote:
> On Wed, 9 Jan 2002, Martin Kahlert wrote:
> > cool idea, and i immediately changed the line
> > if (FLOAT_WORDS_BIG_ENDIAN)
> > into
> > if (FLOAT_WORDS_BIG_ENDIAN && sizeof(num) < 8)
> > and after that the prog worked o.k. for the testcase on Linux and Solaris.
> Good. Thanks for trying that. It failed on my sparcv9 and alpha builds,
> apparently for unrelated reasons :(
This change survived a full bootstrap on sparc-sun-solaris2.7 with snapshot
gcc-20020107 here (only took me a day...)
My program compiles and seems to work correctly with it. I will check JNI tomorrow.
So i would be glad, if anybody would check in a correct fix for this bug
(considering my one an ugly hack only demonstrating that your suspicion was correct).
> > What's the idea behind HOST_WIDE_INT? For the java frontend, all the
> > types are defined exactly by Sun. E.g. an int has 32 bits and so on.
> > So wouldn't types like int32_t be better for such tasks?
> We're pretty much constrained to using GCC's type system. HOST_WIDE_INT
> is normally the largest integer type the host compiler can accomodate,
> i.e. `long long' if the compiler supports it, else `long'.
> However for building gcj we don't support non-GCC host compilers, so
> "sizeof(HOST_WIDE_INT) >= 8" is probably a safe bet.
This makes the byte swap unneccessary on all architectures, doesn't it?
The early bird catches the worm. If you want something else for
breakfast, get up later.
More information about the Java