From fnaumann@mail.cs.uni-magdeburg.de Tue Dec 9 15:09:08 2003 Date: Tue, 9 Dec 2003 15:02:22 +0100 (CET) From: Standa Opichal To: Arnaud BERCEGEAY cc: MiNT Mailing List Subject: Re: [MiNT] gemlib OBSPEC & TEDINFO problem In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: opichals@seznam.cz Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: 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