This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]