comp.lang.ada
 help / color / mirror / Atom feed
From: wilson%anchor.DECnet@LLL-ICDC.ARPA ("ANCHOR::WILSON")
Subject: Where's my exception?!?
Date: Tue, 19-Aug-86 14:16:00 EDT	[thread overview]
Date: Tue Aug 19 14:16:00 1986
Message-ID: <8608200335.AA21581@ucbvax.Berkeley.EDU> (raw)


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
------

                 reply	other threads:[~1986-08-19 18:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox