From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 2001-08-28 19:10:14 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Subject: Re: Subtle Bugs, kudos Ada (was How Ada ...Red Code ...) Date: 28 Aug 2001 21:10:11 -0500 Organization: LJK Software Message-ID: References: <87d75fhaod.fsf@deneb.enyo.de> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 999051013 26478 192.135.80.34 (29 Aug 2001 02:10:13 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Wed, 29 Aug 2001 02:10:13 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:12542 comp.lang.c:77324 comp.lang.c++:86340 Date: 2001-08-28T21:10:11-05:00 List-Id: In article <87d75fhaod.fsf@deneb.enyo.de>, Florian Weimer writes: > Joe Maun writes: > >>> Under ones' complement, the bit pattern 1111...111 is non-negative; >> >> Wrong. If it's not a trap representation it's *negative* zero (ISO/IEC >> 9899:1999 - 6.2.6.2[2]). >> >>> it represents the value zero. When this is right shifted by 1, it must >>> result in the value 0. >> >> Since it is a negative value, the resulting value is >> implementation-defined. The resulting bits must have the form ?111...11. > > How do you derive that from the standard? From the phrase 'The result > of E1 >> E2 is E1 right-shifted E2 bit positions.'? What happens when > we write down the bits starting with the least significant bit? That might depend on whether your "start" of writing is on the left (European style) or the right (Arabic style) :-)