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]

Re: Alpha vs. new ABI


Jeff Sturm <jeff.sturm@appnet.com> writes:

> ISTR that libjava requires this somewhere.  But gcj/array.h declares
> JArray thusly:
> 
>   template<class T>
>   class JArray : public __JArray
>   {
>     T data[0];
>   public:
>     friend T* elements<>(JArray<T>& x);
>     ...
>   };
> 
> Doesn't seem like any special provisions for alignment are made here...
> i.e. if `T' is a jchar, then data will be aligned on a jchar boundary.

Would it work to add a dummy field:

    jdouble dummy[0];

before the data field?
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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