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: 103376,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-04 09:21:13 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!proxad.net!feeder2-1.proxad.net!news2-2.free.fr!not-for-mail Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? References: <3C34BF2C.6030500@mail.com> From: Jean-Marc Bourguet Date: 04 Jan 2002 18:21:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <3c35e488$0$194$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 04 Jan 2002 18:21:13 MET NNTP-Posting-Host: 158.140.208.29 X-Trace: 1010164873 news2-2.free.fr 194 158.140.208.29 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:18546 Date: 2002-01-04T18:21:13+01:00 List-Id: Preben Randhol writes: > On Thu, 03 Jan 2002 22:07:52 GMT, Ted Dennison wrote: > > The reason things were done this way was so that the optimizer > > could rearrange and short-circuit the expression itself (or not) > > depending on what is more efficient on its architecture. See the > > Ada 83 Rationale 3.10 if you really want a discussion ( online at > > Does this mean that one cannot know whether both sides will be > evaluated or not? How can the optimiser know whether to use > short-circuit or not. i mean what does it look for? If the compiler can show that there is no side effect, it can short circuit either part of a non short circuit operator. In the context of "a, b : boolean;", "a and b" can be implemented like "a and then b" or "b and then a". Yours, -- Jean-Marc