When do you use "if ( a = b )"? (was Re: Funny mistake)

Christopher R Volpe volpe at camelback.crd.ge.com
Tue Apr 2 02:05:29 AEST 1991


In article <18099 at crdgw1.crd.ge.com>, I wrote
|>In article <20137 at alice.att.com>, ark at alice.att.com (Andrew Koenig) writes:
|>|>I believe that this behavior on the part of the compiler
|>|>is entirely reasonable.
|>
|>Even if it's completely non-conforming?
|>

Nevermind. I checked and noticed that the behavior is undefined in case
of an overflow. (I thought it was just an implementation defined result, 
and therefore the value of the expression is all that matters, and that would
be the same in each case.)

Now, if a,b, and c were unsigned...
                            
==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.lang.c mailing list