Article View: net.lang.ada
Article #920Where's my exception?!?
From: "ANCHOR::WILSON"
Date: Tue, 19 Aug 1986 18:16
Date: Tue, 19 Aug 1986 18:16
36 lines
1482 bytes
1482 bytes
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 ------
Technical Details
Message-ID:
<8608200335.AA21581@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!LLL-ICDC.ARPA!wilson%anchor.DECnetShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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" <wilson%anchor.decnet@lll-icdc>
Organization: The ARPA Internet
Lines: 36