Bug in Float.valueOf(String)

Archie Cobbs archie at whistle.com
Tue Jan 26 13:54:19 PST 1999

Alexandre Oliva writes:
> >> case 'F':
> >> call.callsize[i] = 1;
> >> in[i].f = (jfloat)va_arg(args, jdouble);
> >> break;
> > Duh.. of course, that's a much more correct solution.
> That was not enough when I first found the problem: when a native
> method was called, a float would be pushed onto the stack, but then
> the native code compiled by gcc would try to load a double (or so it
> seemed to me).  I'm not 100% sure about it right now, though, I have
> noticed that quite a long time ago, and worked around the problem in
> another way.  Maybe I'll have time to revisit this issue next week.

Yes.. though that is a separate (but analogous) problem, having to
do with the code that implements calling native functions. This
code should "know" that a float argument, when passed to a C function,
is promoted to double.

Not sure exactly where/how to fix this.. any suggestions?


Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

More information about the kaffe mailing list