Path: chuka.playstation.co.uk!news From: alex@teeth.demon.co.uk (Alex Amsel) Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: Interesting anomaly Date: Mon, 20 Oct 1997 15:55:01 GMT Organization: Into Beyond Lines: 26 Message-ID: <344e744a.5865623@news.playstation.co.uk> References: <344B58D3.268F@127.0.0.1> Reply-To: alex@teeth.demon.co.uk NNTP-Posting-Host: teeth.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent .99g/32.335 On Mon, 20 Oct 1997 14:12:51 +0100, Majik did quoth at me: >Again, I'm not sure if this is compiler trouble or MIPS trouble but >hey-ho, > >if I have a module, that as part of its global data declares something >like: > >unsigned char blk[27]; Although the compiler probably ought to be aligning things, you should always try to long word align all your structures and arrays. The above allocates 27 bytes of ram for blk, thus following data or code is being misaligned and the MIPS processor gets very upset. Regards, Alex Amsel + Tuna Technologies + Telephone & Fax +44 (0)114 221 0686 + + For all your Win95/NT/Console Game and Tool Development + + And we say, "A good programmer always blames Microsoft" + + I proclaimed "Bring back the Doog!", and so it was done +