Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: So Y is my pointer so bogus
Date: Wed, 3 Feb 1999 17:51:05 -0700 (MST)	[thread overview]
Message-ID: <199902040051.RAA18110@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <36B8DFAC.59B2FB48@voicenet.com> from "Uncle George" at Feb 3, 99 06:45:48 pm

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


  reply	other threads:[~1999-02-04  0:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-03 22:36 So Y is my pointer so bogus Uncle George
1999-02-03 22:59 ` Jason Duerstock
1999-02-03 23:32   ` B. James Phillippe
1999-02-03 23:45     ` Uncle George
1999-02-04  0:51       ` Michal Jaegermann [this message]
1999-02-04  0:55         ` Michal Jaegermann
1999-02-03 23:36   ` Uncle George
1999-02-03 23:40   ` Re[2]: " Dan
1999-02-04  0:38 ` Michal Jaegermann
1999-02-04 11:25 ` Phil Carmody
  -- strict thread matches above, loose matches on Subject: below --
1999-02-03 22:57 Lagodzinski, Andrew
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox