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=0.8 required=5.0 tests=BAYES_00,INVALID_DATE, PLING_QUERY,REPLYTO_WITHOUT_TO_CC 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!lll-crg!nike!ucbcad!ucbvax!LLL-ICDC.ARPA!wilson%anchor.DECnet From: wilson%anchor.DECnet@LLL-ICDC.ARPA ("ANCHOR::WILSON") Newsgroups: net.lang.ada Subject: Where's my exception?!? Message-ID: <8608200335.AA21581@ucbvax.Berkeley.EDU> Date: Tue, 19-Aug-86 14:16:00 EDT Article-I.D.: ucbvax.8608200335.AA21581 Posted: Tue Aug 19 14:16:00 1986 Date-Received: Wed, 20-Aug-86 23:27:18 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "ANCHOR::WILSON" Organization: The ARPA Internet List-Id: Here's a little program which raises an exceptional point: procedure TEST is I : INTEGER := INTEGER'last + 1; begin null; end TEST; Should this program raise an exception? Well, I'd like to think so. However, the DEC compiler optimizes my whole program away, since there's I/O or other visible action taken, and the program terminates normally. Summarizing LRM 10.6: 1. A compiler is allowed to replace code which would cause an exception to be raised with code to raise that exception 2. Code which would never be executed need not be considered "in error" if it is never called. Neither of these statements seem to apply to this program. Is the compiler taking unauthorized action, or am I missing something in the LRM? Thanks, --- Rick wilson%anchor.decnet@lll-icdc.arpa ------