This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Storing C++ data in an instance field using CNI?
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> Except, as I think I mentioned before, for alignment issues. It would
> Andrew> be nice to have a type that handled this properly, and Bryce's
> Andrew> "RawDataMarked" would do it. I would prefer it if a byte array was
> Andrew> fully aligned, but of course that would be a CNI special feature.
>
> You could use long[] instead.
You could, but it wouldn't be legal C -- it would be an aliasing
error. Actually, I dunno if even byte[] is legal -- it's a "character
type" that has the magic property of being convertible to any other
type.
Andrew.