From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 22152 invoked from network); 4 Feb 1999 00:58:25 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 4 Feb 1999 00:58:25 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id TAA19735 for ; Wed, 3 Feb 1999 19:51:07 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id RAA18110 for axp-list@redhat.com; Wed, 3 Feb 1999 17:51:05 -0700 From: Michal Jaegermann Message-Id: <199902040051.RAA18110@ellpspace.math.ualberta.ca> Subject: Re: So Y is my pointer so bogus To: axp-list@redhat.com Date: Wed, 3 Feb 1999 17:51:05 -0700 (MST) In-Reply-To: <36B8DFAC.59B2FB48@voicenet.com> from "Uncle George" at Feb 3, 99 06:45:48 pm Content-Type: text Uncle George wrote: > > yup, in essence yes. It seems that the "unsigned int" screws up the arith. I do no not follow. In that sense that you got what C says that you will get? I did not think that this was called "screws up". > As i > remem changing the ints ( without the unsigned) to long didn't help either!. I do not follow that either. I definitely got 0xffffffffffffe480 from printf("%p\n", (int *)a + ((x2-x1-x3)*P + (y2-y1-y3)*S)); Are you getting something else? If you will "save" parenthesis around this offset computation on the right results will be different as promotion rules will be applied in a different order. That what C Standard says, IIRC. Michal