Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!agate!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: Structure alignment in Manx C Message-ID: <8802141808.AA27862@cory.Berkeley.EDU> Date: 14 Feb 88 18:08:02 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 32 >>dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: >>> > (Manx don't put longword entities on longword boundaries . . .) >>> It might not be preferable, but can hardly be called a bug. >>> Remember that warning a lonnngg time ago about declaring such items as >>> FileInfoBlocks auto? You can't for the very reason that they require >>> longword alignment and since longwords don't, no assumption can be made >>> as to the alignment the compiler used. >> >>Any compiler for a 68000/68020 machine, that does not do everything >>reasonable to put longword structures on longword boundaries, is buggy. >>Period. The Amiga is most certainly a 68000/68020 machine. I wonder >>how much slower those 68020 machines run because all of the Manx >>compiled commercial software (at least those with 16-bit ints) don't >>have their longwords aligned correctly? I wouldn't mind seeing a compile time option to fix the problem, but there are just as many reasons for NOT wanting them on longword boundries. You might want a more compact structure. C-A sure did, and... If you were to make longword alignment the default, your C compiler would suddenly become totally incompatible with almost every Amiga structure in existance. For example: struct Menu, &menu.MenuName relative to &menu.NextMenu is on a word boundry. struct MenuItem, Node, Message, and thus IORequest, IOStdReq, etc..... -Matt