Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!munnari.oz.au!csource!david From: david@csource.oz.au (david nugent) Newsgroups: comp.lang.c Subject: Re: MSC 5.1 bug ?? Message-ID: <98.25E63D50@csource.oz.au> Date: 24 Feb 90 17:06:27 GMT Organization: Unique Computing Pty Limited Lines: 28 In a message dated 22-Feb-90, Kevin D. Quitt writes: >Your head was on right; I couldn't believe it either. I suspected >then disproved: 1) -1 generated 0x0000FFFF instead of 0xFFFFFFFF, 2) an >unsigned comparison. > > >;|*** if ( l >= (i & 1 ) ) This is fairly typical behaviour. I've seen similar things on a number of compilers, though I can't find any reason why automatic type conversions should do this. 'l' is being resolved as an int prior the comparison. Try: if ( l >= (long) (i & 1) ) and you'll get something quite different. david -- UUCP: ...!munnari!csource!david Internet: david@csource.oz.au FidoNet: 3:632/348