From mint-bounce@lists.fishpool.fi Sun Jan 11 10:59:01 2009 Subject: Re: [MiNT] struct align From: Petr Stehlik To: MiNT Mailing List In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-2" Date: Sun, 11 Jan 2009 16:51:10 +0100 Message-Id: <1231689070.6121.1.camel@joy> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: pstehlik@sophics.cz Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id n0BFx0if010125 Miro Kropacek píše v Ne 11. 01. 2009 v 16:27 +0100: > You see -- the 3rd member is put xxxxxC address (i.e. divisible by 4), > fine. But now, on both atari compilers is then 'long' member aligned > on 2 bytes (xxxxE, which is 14 for x = 0, i.e. divisible only by 2) > what I find wrong since it should work according to the data type > (char = aligned on 1 byte boundary, short = 2 bytes, long = 4 I very much doubt that aligning should be on sizeof(datatype). I'd guess that aligning is based on data bus size and old ST was 16-bit thus long is word aligned on atari. Petr