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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!sdcsvax!ucbvax!MACOMW.ARPA!MEANS From: MEANS@MACOMW.ARPA (Bob Means) Newsgroups: comp.lang.ada Subject: forwarded mail Message-ID: <550280738.0.MEANS@MACOMW.ARPA> Date: Tue, 9-Jun-87 19:45:38 EDT Article-I.D.: MACOMW.550280738.0.MEANS Posted: Tue Jun 9 19:45:38 1987 Date-Received: Fri, 12-Jun-87 05:38:02 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet List-Id: Date: Wed May 27 14:20:56 1987 Version: VM version 2.27 -SNUFFL- From: John Bollenbacher TPII 120 x2220 To: means@TORREY Subject: Ada bulletin board Bob, Do you think you could post this mail on the Arpanet Ada BB for me? Thanks. =================== Dale Worley at Cullinet Software writes: Is the following program required to raise CONSTRAINT_ERROR (or whatever)? procedure y is type x is range 0..100; a : x := 100; begin a := a + 1; end y; I think the answer lies in LRM 11.6(5): "A predefined operation need not be invoked at all if its only possible effect is to propogate a predefined exception..." Since the only other possible effect of this program is to set the value of 'a' (which is then never used), the compiler can optimize the whole program away. Moral: beware of making conclusions about exceptions based on simple programs. -John Bollenbacher (M/A-COM Government Systems) ------- ------- -------