[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Classpath build process and VM-specific issues
From: |
Andrew Haley |
Subject: |
Re: Classpath build process and VM-specific issues |
Date: |
Tue, 6 Apr 2004 10:11:14 +0100 |
Etienne Gagnon writes:
> Andrew Haley wrote:
> > malloc() returns a char*, not a jbyte*.
>
> So, can you tell me the difference between a jbyte and a "signed char"?
>
> > Sigh. No it isn't, and this code will break with gcc.
>
> OK, maybe I am tired and I don't see it. GCC -Wall does not complain
> about the attached example.
When you have aliasing errors, the result is usually incorrect code,
not compile time warnings.
> > ... Also, "when a pointer to an object is converted
> > to a pointer to a character type, the result points to the lowest
> > addressed byte of the object. Successive increments of the result, up
> > to the size of the object, yield pointers to the remaining bytes of
> > the object."
>
> We agree on this. Now: what's different between "signed char" and "jbyte"?
> Can they actually be distinct on some platform?
Sure. That's the question, really: whether on all platforms a jbyte
is necessarily a character type. It isn't descibed as one on the JNI
spec, so it may or may not be. On existing platforms it probably is,
but on those platforms a pointer will always fit into a long.
It all depends on how jbyte is defined: it can either be a signed
character type or not. I'm suggesting that we should not depend on
that.
Andrew.
- Re: Classpath build process and VM-specific issues, (continued)
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/07
- Re: Classpath build process and VM-specific issues, David P Grove, 2004/04/07
- Re: Classpath build process and VM-specific issues, Etienne Gagnon, 2004/04/07
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/07
- Re: Classpath build process and VM-specific issues, Etienne Gagnon, 2004/04/07
- Re: Classpath build process and VM-specific issues, Dalibor Topic, 2004/04/08
- Re: Classpath build process and VM-specific issues, Ingo Prötel, 2004/04/07
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/06
- Re: Classpath build process and VM-specific issues, Etienne Gagnon, 2004/04/06
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/07
- Re: Classpath build process and VM-specific issues,
Andrew Haley <=
- Re: Classpath build process and VM-specific issues, Etienne Gagnon, 2004/04/05
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/05
- Re: Classpath build process and VM-specific issues, Michael Koch, 2004/04/05
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/05
- Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/05
Re: Classpath build process and VM-specific issues, Andrew Haley, 2004/04/04
Re: Classpath build process and VM-specific issues, Mark Wielaard, 2004/04/04
RE: Classpath build process and VM-specific issues, Jeroen Frijters, 2004/04/05
RE: Classpath build process and VM-specific issues, Jeroen Frijters, 2004/04/05