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-Thread: 103376,553a6b79b2471571 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Newsgroups: comp.lang.ada Subject: Re: How do you bitwise operations in Ada '83 and '95 From: Georg Bauhaus In-Reply-To: <130aai4of5k0s.1175ed13axp2v.dlg@40tude.net> References: <9315684D-C216-4EDA-8852-0A6BD4C275B0@amado-alves.info> <1e7szqc5niq0u$.1oqd2mhiiccyx.dlg@40tude.net> <71nkuwdmd7v5.xs4ho9ifpcfx$.dlg@40tude.net> <130aai4of5k0s.1175ed13axp2v.dlg@40tude.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1153565549.10562.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Date: Sat, 22 Jul 2006 12:52:29 +0200 NNTP-Posting-Date: 22 Jul 2006 12:52:03 MEST NNTP-Posting-Host: daa4ca56.newsread2.arcor-online.net X-Trace: DXC=IoW>heGNc9n18V74W6`bolQ5U85hF6f;djW\KbG]kaMhU7^]5?JhlBnnDR>:Fa;F`gPCY\c7>ejVhLQ\DC0NJenon4HjUacX8Fi X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5875 Date: 2006-07-22T12:52:03+02:00 List-Id: On Sat, 2006-07-22 at 10:32 +0200, Dmitry A. Kazakov wrote: > Does ANSI C standard require (x<<1) == (x*2)? > > As for Ada 95, ARM certainly does not. This is why Shift_* is not portable. type Unsigned_n is mod 2**n; -- Annex B.2 won't be portable for the same reason? As for the bit representation of these intrinsic modular values, wouldn't shift_left etc. have to provide a result that does make sense, as per the AS-IF rule?