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!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Problem with optimizations Date: Tue, 28 Apr 2009 20:12:13 +0100 Message-ID: References: <49f73730$0$2850$ba620e4c@news.skynet.be> <49f753b9$0$2861$ba620e4c@news.skynet.be> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net s2NptC5rTDNaGe6w6XnbmwYG9EQ4N8Yu69Z+Lg5vM4b7oD4Ty+ Cancel-Lock: sha1:q3tkuy1uXV74UIW/Xy5E3gSBYxk= User-Agent: Microsoft-Entourage/12.15.0.081119 Thread-Topic: Problem with optimizations Thread-Index: AcnINTx2IceurxMGY0yhwjfvG9x8hQ== Xref: g2news2.google.com comp.lang.ada:5589 Date: 2009-04-28T20:12:13+01:00 List-Id: On 28/04/2009 20:06, in article 49f753b9$0$2861$ba620e4c@news.skynet.be, "Olivier Scalbert" wrote: > (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 ! > ;-) It has no alternative, thanks to Turing. 8-) | 8-( -- Bill "To explain the unknown by the known is a logical procedure; to explain the known by the unknown is a form of theological lunacy." David Brooks