comp.lang.ada
 help / color / mirror / Atom feed
* Where's my exception?!?
@ 1986-08-19 18:16 "ANCHOR::WILSON"
  0 siblings, 0 replies; only message in thread
From: "ANCHOR::WILSON" @ 1986-08-19 18:16 UTC (permalink / 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
------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1986-08-19 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-08-19 18:16 Where's my exception?!? "ANCHOR::WILSON"

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