From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6721 invoked from network); 3 Feb 1999 23:04:27 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 3 Feb 1999 23:04:27 -0000 Received: from sdi.aatech.com (jason@sdi.cluephone.com [206.156.148.252]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id RAA11048 for ; Wed, 3 Feb 1999 17:57:12 -0500 Received: from localhost (jason@localhost) by sdi.aatech.com (8.8.7/8.8.7) with ESMTP id RAA06542; Wed, 3 Feb 1999 17:59:15 -0500 Date: Wed, 3 Feb 1999 17:59:15 -0500 (EST) From: Jason Duerstock To: axp-list@redhat.com cc: Dan Schmitt Subject: Re: So Y is my pointer so bogus In-Reply-To: <36B8CF6A.D373F882@voicenet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Unless my brain has turned to jello lately, a = (void *) 0; is the same thing as saying a = NULL; and a = (int *) a; dereferences null, thus causing your program to go kerfloom. Perhaps you'd like to explain more clearly what you're trying to do? Jason On Wed, 3 Feb 1999, Uncle George wrote: > This little example caused a (un-expected ) pointer failure in one of > the font routines in my java 1.2 port on linux/alpha. It was expected to > add a -1760 ( -1760 * sizeof(int)) but does not. > Ugg. what is a 64bitter to do. > gat > main() > { > > int x1,x2,x3; > int y1,y2,y3; > unsigned int P; > unsigned int S; > void *a; > > a = (void *)0; > x1=20,x2=0,x3=0; > y1=5, y2=0,y3=0; > P = 1; > S = 348; > > a = (int *)a +(x2-x1-x3)*P + (y2-y1-y3)*S; > printf("a = %p\n",a); > }