From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5457eacc92ebc3d20816bc2b2b6bbf76.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199703130816.JAA18578@xs1.simplex.nl> Date: Thu, 13 Mar 1997 07:22:06 -0500 From: Uncle George Subject: Re: General Porting to Alpha Question Britt Bolen wrote: The only problems I > had with the build were of this type: > > warning: cast from pointer to integer of different size > > Which (if I'm not mistaken) is because of the alpha's 64 bit architecture, > right? The program dumped core as soon as it ran. pointers = 64 bits long = 64 bits int = 32 bits short = 16 bits ( but should be avoided. fetches are 32/64 bits ) bytes = 8 bits ( also should be avoided ( if u can ) ) therefore: int i; char *p i = p; /* will loose the upper 32 bits */ You should be carefull of longs, and how they are handled. the & masking of longs may not get the upper 32 bits ( ie long k & 0xffff still leaves some 48 bits and not the expected 16 ) hope this helps -- Uncle George ( aka G. Baeslack ) http://www.voicenet.com/~gatgul -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com