From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199710301310.IAA05619@cti2.cog-tech.com> Date: Thu, 30 Oct 1997 08:10:58 -0500 From: Bryan B. Thompson Subject: casting int to / from pointer on alpha Hello, I am porting an application with some X11 interface code that was originally ported years back from SunView, so its definately got a "legacy". There are some instances in the code where XtCallbackProc instances are used and the old code assumed that one of the parameters, properly a pointer, could swallow an 'int' and not burp. Well, its burping. I do not understand how the alpha handles explicit (or implicit) int/void* casts. Is it doing sign extension? Preserving the lower 32 bits? What I would like to find is an appropriate incantation for casting an int to/from a pointer that will work on the alpha, and elsewhere as well. Can this be done in general, or must I make sure that the 'int' in question is typed as a 'long' on the alpha so that it happily can co-exist in the space of a pointer. This is all C programming, of course. I'm sorry if this is too off target for this list, but I though some people out there could answer this one from experience and the answer seems of general interest in porting (bad) code to the alpha. Thanks, -- bryan thompson Cognitive Technologies, Inc. bryan@cog-tech.com -- 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