Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!decwrl!nsc!voder!apple!baum From: baum@Apple.COM (Allen J. Baum) Newsgroups: comp.arch Subject: Re: Shifting question Message-ID: <14236@apple.Apple.COM> Date: 19 Jul 88 02:09:29 GMT References: <705@bnr-rsc.UUCP> <60137@sun.uucp> Reply-To: baum@apple.UUCP (Allen Baum) Organization: Apple Computer, Inc. Lines: 19 [] >In article <60137@sun.uucp> alanf%smile@Sun.COM (Alan Fargusson) writes: >In article <705@bnr-rsc.UUCP>, jim@bnr-rsc.UUCP (Jim Somerville) writes: >> I have a question on how compilers should handle shifting. > >> What should be the value of y after the shifting is complete? >> a) x >> b) 0 >> c) none of the above > >D: All of the above. It is implemetation dependent. > >> Do I have a valid complaint if the compiler I am using gives x? > >No. Since different hardware will implements the shift in different ways it >would be rather difficult to define this. Our Cray will give x!=0, since an int is 64 bits.... -- {decwrl,hplabs,ihnp4}!nsc!apple!baum (408)973-3385