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: a07f3367d7,3737542e2ed2b8e1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!feeder8.cambrium.nl!feed.tweaknews.nl!195.238.0.231.MISMATCH!news.skynet.be!195.238.0.222.MISMATCH!newsspl501.isp.belgacom.be!tjb!not-for-mail Date: Tue, 28 Apr 2009 21:06:37 +0200 From: Olivier Scalbert User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Problem with optimizations References: <49f73730$0$2850$ba620e4c@news.skynet.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <49f753b9$0$2861$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: ce69ce51.news.skynet.be X-Trace: 1240945594 news.skynet.be 2861 87.65.130.237:50474 X-Complaints-To: usenet-abuse@skynet.be Xref: g2news2.google.com comp.lang.ada:5587 Date: 2009-04-28T21:06:37+02:00 List-Id: (see below) wrote: > > There is no else part for the following if: > > if Is_Solved(Cube) then > New_Line; > Put("Solved !"); New_Line; > > for i in 1..depth-1 loop > Ada.Integer_Text_IO.Put(Integer(Moves(i))); > end loop; > Result := True; > end if; > > So the procedure can exit with Result undefined. Since the program is > incorrect, varying optimisation, or implementation details, is likely to > give varying results. Some may co-incidentally be the results you expect. > > P.S. I did not use gdb. > You are right ! So an Ada compiler can compile incorrect programs ! ;-)