comp.lang.ada
 help / color / mirror / Atom feed
* forwarded mail
@ 1987-06-09 23:45 Bob Means
  1987-06-10  6:52 ` forwarded mail Ada bulletin board amiram%virgo
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Means @ 1987-06-09 23:45 UTC (permalink / raw)




Date: Wed May 27 14:20:56 1987
Version: VM version 2.27 -SNUFFL-
From: John Bollenbacher TPII 120 x2220 <JBOLLENBACHE@SNUFFL>
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)

-------
-------

-------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: forwarded mail Ada bulletin board
  1987-06-09 23:45 forwarded mail Bob Means
@ 1987-06-10  6:52 ` amiram%virgo
  0 siblings, 0 replies; 2+ messages in thread
From: amiram%virgo @ 1987-06-10  6:52 UTC (permalink / raw)


You misread the LRM. What it says is that the evealuation of the expression may
be optimized away, but the program MUST raise the exception.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1987-06-10  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-06-09 23:45 forwarded mail Bob Means
1987-06-10  6:52 ` forwarded mail Ada bulletin board amiram%virgo

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