Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? (was Re: Funny mistake) Message-ID: <6773:Apr116:28:2991@kramden.acf.nyu.edu> Date: 1 Apr 91 16:28:29 GMT References: <3482@inews.intel.com> <20137@alice.att.com> <18099@crdgw1.crd.ge.com> Organization: IR Lines: 12 In article <18099@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes: > In article <20137@alice.att.com>, ark@alice.att.com (Andrew Koenig) writes: > [Deleted description of implementation that gave different results.] > |>I believe that this behavior on the part of the compiler > |>is entirely reasonable. > Even if it's completely non-conforming? I believe the original post contained a phrase like ``upon overflow.'' Nothing's guaranteed for ints upon overflow. I'm not sure if your CPU is allowed to explode, but you're allowed to get weird results. ---Dan