Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!rochester!pt.cs.cmu.edu!andrew.cmu.edu!jm36+ From: jm36+@andrew.cmu.edu (John Gardiner Myers) Newsgroups: comp.windows.x Subject: Re: bug in XCopyArea() of X11R3 Xsun server Message-ID: Date: 18 May 89 19:33:07 GMT References: <8905171605.AA16290@expo.lcs.mit.edu> Organization: Mathematics, Carnegie Mellon, Pittsburgh, PA Lines: 31 In-Reply-To: <8905171605.AA16290@expo.lcs.mit.edu> DAN@YKTVMV.BITNET writes: > Richard suggested putting in ifdef code for sparc's > to fix a design bug in the sparc architecture. > In fact he should just complain to his compiler supplier > for not supporting ANSI C. ANSI C is quite clear > that the result of a shift of 32 is 0. Please quote chapter and verse. All of the C reference manuals I have seen state that the result is undefined. For example, K&R 2nd ed., section A7.8 says: (emphasis mine) "The result is undefined if the right operand is negative, or grater than or EQUAL TO the number of bits in the left expression's type." > I would not want to see people defensively coding > all their shifts in this fashion because one > machine got it wrong. It will penalize all the > machines that got it right. I would like to see people coding all their shifts in order to stay within the defined semantics of the language. -- _.John G. Myers Internet: jm36+@andrew.cmu.edu (412) 268-2984 LoseNet: ...!seismo!ihnp4!wiscvm.wisc.edu!give!up > Walt Daniels, IBM Research (RISC land) _.John