[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] gemlib OBSPEC & TEDINFO problem
Hi Arnaud!
On Mon, 8 Dec 2003, Arnaud BERCEGEAY wrote:
> > Can't we change this to contain the OBJC_COLORWORD structure directly or
> > at least as some union inside?
>
> Well... TEDINFO.te_color is a "short" value (2 bytes).
>
> Are we sure that sizeof(OBJC_COLORWORD) will always be 2 bytes, for all
> compilers ? Is there a rule to garanty that.
Well, we can simply put a new compiler port bootstrap test which would
check this by some assert() or something.
> A bit further: if we use a union data (with a short and a OBJC_COLORWORD),
> same question: how can we be sure that size(this_union)=2 with all
> compilers ?
I think all 3 available compilers gcc, Sozobon and PureC are compatible in
this and there should be a way to manage this also for other compiler.
best regards
STan