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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74a56083ffbe573d X-Google-Attributes: gid103376,public From: mab@dst17.wdl.loral.com (Mark A Biggar) Subject: Re: Zoo question Date: 1996/08/19 Message-ID: <4va0b5$geo@wdl1.wdl.lmco.com>#1/1 X-Deja-AN: 175101259 references: <321301EC.2C4D@lmtas.lmco.com> <32185FC3.2781E494@escmail.orl.mmc.com> organization: Loral Western Development Labs newsgroups: comp.lang.ada Date: 1996-08-19T00:00:00+00:00 List-Id: In article <32185FC3.2781E494@escmail.orl.mmc.com> Ted Dennison writes: >Robert Dewar wrote: >> Ken asks >> "Assuming no supresses, would there be a case where #1 would not apply (no >> exception on assignment)?" >> No, the code you wrote MUST give an exception on the assignment. Any >> speculation to the contrary is simply misinformed, any compiler that >> does not raise the exception (assuming checks are turned on) is simply >> broken, and it is a bug. >That does seem to jibe with 5.2(3-4) in my Ada 83 LRM. However, I could >have sworn I saw a rather long discussion here a year ago about compiler >optimizations moving constraint checks out of loops. I suppose this is >still possible, as long as there aren't any declare blocks (or is it?). Even a declare block doesn't prevent that optimization, but if that declare block has a exception handler you can't move any code that could possibly raise the exception outside the block. Exceptions must be caughts by the inner most hadler for the exception that encloses the code that raises the exception. Adn, yes this does restorct the use of code moving optimizations, but anyother rule would cause choas. -- Mark Biggar mab@wdl.lmco.com