Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!hplabs!hpfcdc!hpislx!hplvli!boyne From: boyne@hplvli.HP.COM (Art Boyne) Newsgroups: comp.lang.c Subject: Re: cast question Message-ID: <340007@hplvli.HP.COM> Date: 31 Jan 89 15:12:44 GMT References: <662@csd4.milw.wisc.edu> Organization: Loveland Inst. Div Lines: 21 jd@csd4.milw.wisc.edu (James R Drinkwater) asks: > Will I run into any problems with the following: > > struct something *ptr; > ... > func((int)ptr); > ... > func(arg) > int arg; > { > ... > return(arg); > } Certainly will, on machines where sizeof(pointer) > sizeof(int). The implementation of C for the 68000 I've been using for the last five years has sizeof(pointer)=sizeof(long)=32 bits and sizeof(int)=16 bits. Art Boyne boyne@hplvla.HP.COM