From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: X-Archive-Original-Message-ID: <980127154015.ZM8133@dixtat.hmi.de> Date: Tue, 27 Jan 1998 15:44:49 +0000 From: David Alan Gilbert Subject: Re: pointer to integer of different size Adrian Feiguin wrote: > > When compiling many applications on my Alpha with RH4.2 and egcs-1.0.1, I > use to get the message: > > warning: cast from pointer to integer of different size > > Can anybody tell me why this happens, and if there is any flag to avoid > the consequent compilation errors? On PC's and most other boxes integers are 4 bytes and pointers are 4 bytes. Now your not supposed to store a pointer value in an integer but it won't do any harm on a PC because they are the same size. It is however grossly horrid in most cases. On the Alpha, pointers are 8 bytes long so if you try and squeeze them into a 4 byte integer you will loose something somewhere - and probably crash natsily if you get the pointer back and try and use it somewhere In general the error means that the code is broken and should be fixed. Dave -- ---------------------------------------------------------------------- - Dr. David Alan Gilbert - WARNING! This is a beta release .signature- - Work: dg @ cogency.co.uk - 0161-428-9444 - - Home: gro.gilbert @ treblig.org - - ---------------------------------------------------------------------- -- 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