* References in Ada exceptions
@ 1993-06-22 19:04 cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!cs.utex
0 siblings, 0 replies; 5+ messages in thread
From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!cs.utex @ 1993-06-22 19:04 UTC (permalink / raw)
[ The following is a request for information by a member of my department.
Please reply direct to my email address, and I will forward. mg.]
I seem to remember that the following is dangerous:
for i in 1..10 loop
begin
...
exception
...
put(i);
end;
end loop;
The state of the variable i cannot be guaranteed in an exception
handler. We had a problem like this on the DEC Ada compiler, and
I claim it was not a compiler bug, but a known limitation of Ada
validated compilers. Is there a formal ruling on this? We require
a hard reference. Please reply by email to mgatlin@atlas.nafb.trw.com.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: References in Ada exceptions
@ 1993-06-23 2:09 pa.dec.com!e2big.mko.dec.com!jac.nuo.dec.com!digits.enet.dec.com!brett
0 siblings, 0 replies; 5+ messages in thread
From: pa.dec.com!e2big.mko.dec.com!jac.nuo.dec.com!digits.enet.dec.com!brett @ 1993-06-23 2:09 UTC (permalink / raw)
In article <3176.2c26e734@atlas.nafb.trw.com>, mgatlin@atlas.nafb.trw.com write
s...
>[ The following is a request for information by a member of my department.
> Please reply direct to my email address, and I will forward. mg.]
>
>I seem to remember that the following is dangerous:
>
> for i in 1..10 loop
> begin
> ...
> exception
> ...
> put(i);
> end;
> end loop;
>
>The state of the variable i cannot be guaranteed in an exception
>handler. We had a problem like this on the DEC Ada compiler, and
>I claim it was not a compiler bug, but a known limitation of Ada
>validated compilers. Is there a formal ruling on this? We require
>a hard reference. Please reply by email to mgatlin@atlas.nafb.trw.com.
If a DEC Ada product did this, we would definitely regard it as a bug.
Exceptions within the begin..exception...end should not interrupt operations
such as the loop increment done outside the frame.
I have sent personal mail asking for help reproducing the problem.
/Bevin
DEC Ada team
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: References in Ada exceptions
@ 1993-06-23 18:18 Brian Hanafee
0 siblings, 0 replies; 5+ messages in thread
From: Brian Hanafee @ 1993-06-23 18:18 UTC (permalink / raw)
>I seem to remember that the following is dangerous:
>
> for i in 1..10 loop
> begin
> ...
> exception
> ...
> put(i);
> end;
> end loop;
I can't think of any reason why this might be dangerous, but I was
struck by the similarity between this and the example code in LRM
11.6. Perhaps a memory of that example is causing the concern?
--
Brian Hanafee Advanced Decision Systems
bhanafee@ads.com 1500 Plymouth Street
(415) 960-7300 Mountain View, CA 94043-1230
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: References in Ada exceptions
@ 1993-06-25 12:37 news.intercon.com!panix!netnews!schonberg!dewar
0 siblings, 0 replies; 5+ messages in thread
From: news.intercon.com!panix!netnews!schonberg!dewar @ 1993-06-25 12:37 UTC (permalink / raw)
Well of course I is defined within the exception handler. This is a normal
consequence of fundamental rules of visibility etc. Thus no ruling is
needed or available, and there is no specific "hard reference" to point
to (after all you can't find a hard reference that says that there is no
problem in referencing an identifier starting in column 51!)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: References in Ada exceptions
@ 1993-06-25 20:43 Michael Feldman
0 siblings, 0 replies; 5+ messages in thread
From: Michael Feldman @ 1993-06-25 20:43 UTC (permalink / raw)
In article <dewar.741011826@schonberg> dewar@schonberg.NYU.EDU (Robert Dewar) w
rites:
>Well of course I is defined within the exception handler. This is a normal
>consequence of fundamental rules of visibility etc. Thus no ruling is
>needed or available, and there is no specific "hard reference" to point
>to (after all you can't find a hard reference that says that there is no
>problem in referencing an identifier starting in column 51!)
>
OK, Robert, then let's get this perfectly clear: any compiler that
would put an unpredictable value in I, in that context, is simply
buggy, right? Is that a firm YES I heard all the way from New York?
I scratched my head on this when it was posted - nothing looked wrong
that would cause a strange value in I, but then Ada still surprises me now
and then.:-)
Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman - co-chair, SIGAda Education Committee
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University - Washington, DC 20052 USA
202-994-5253 (voice) - 202-994-5296 (fax) - mfeldman@seas.gwu.edu (Internet)
"Pork is what those other guys get from the Government."
------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1993-06-25 20:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-06-25 12:37 References in Ada exceptions news.intercon.com!panix!netnews!schonberg!dewar
-- strict thread matches above, loose matches on Subject: below --
1993-06-25 20:43 Michael Feldman
1993-06-23 18:18 Brian Hanafee
1993-06-23 2:09 pa.dec.com!e2big.mko.dec.com!jac.nuo.dec.com!digits.enet.dec.com!brett
1993-06-22 19:04 cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!cs.utex
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox