From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e42f728345b2a43 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-09-17 06:12:13 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!darwin.sura.net!europa.eng.gtefsd.com!uunet!psinntp!viper!sonoma!abstine From: abstine@Visix.COM (Art Stine) Subject: Re: Alignment on alpha? Sender: news@visix.com Message-ID: Date: Fri, 17 Sep 1993 12:06:18 GMT Reply-To: abstine@Visix.COM References: <2775bo$52b@utne.zk3.dec.com> Organization: Visix Software Inc. In article 52b@utne.zk3.dec.com, ddhill@zk3.dec.com (Dave Hill) writes: > Almost all unaligned access errors I have dealt with on the Alpha > platform have been because the wrong thing was passed, for example: > > func (long * l) > { > *l = some_value; > } > > > main() > { > int i; > func(&i); > } > > This code can generate an unaligned access, and can produce bad side > affects. For example, the compliler will write 64 bits into the address > that is passed to the function, but you only passed 32 bits worth of > space, so something is getting squashed. > > /Dave i tried playing around with this and it doesn't generate an unaligned access but it does generate compiler warnings under cc and and error under c89 --- -art ---- __ Art Stine \ / /(_ /\/ 11440 Commerce Park Drive Software Engineer \/ / __)/ /\ Reston, Virginia 22091 abstine@visix.com Software Inc Voice: (703) 758-2767 (direct) (703) 758-8230 (main) ... and I'm only saying this because (800) 832-8668 (toll-free) I'm your friend, but there are FAX: (703) 758-0233 many decaffeinated brands that are just as tasty as the real thing.