From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Help Me Please :) Date: 2000/03/30 Message-ID: <38E3A702.718DB3F7@averstar.com>#1/1 X-Deja-AN: 604466981 Content-Transfer-Encoding: 7bit References: <89rlvr$gn9$1@nntp3.atl.mindspring.net> <38D8A607.F61F0FFF@mail.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@inmet2.burl.averstar.com X-Trace: inmet2.burl.averstar.com 954443527 25438 141.199.8.164 (30 Mar 2000 19:12:07 GMT) Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 NNTP-Posting-Date: 30 Mar 2000 19:12:07 GMT Newsgroups: comp.lang.ada Date: 2000-03-30T19:12:07+00:00 List-Id: Robert A Duff wrote: > ... > (On the other hand, Ada *pretends* that it's OK to raise and handle > Constraint_Error, but if you read RM-11.6, you'll find that's not quite > true -- and I doubt if any Ada programmer other than Tucker Taft > actually *understands* 11.6. So in practise, 11.6 says, "Do not handle > predefined exceptions.") This sounds like a request for a quick tutorial on 11.6 ;-). Here is my nickel tour: RM95 11.6(5) says, effectively, that you can remove dead code, even if it might raise an exception due to failing a language-defined check. RM95 11.6(6) says that the compiler (or hardware) can do instruction scheduling (i.e. reordering) even if there are language-defined checks among the instructions, meaning that if you handle an exception raised by the failure of a language-defined check, it might be "imprecise." However, it won't be so imprecise as to disrupt some separately compiled "abstraction" in the middle of an operation, presuming the check failed outside of the abstraction. Or for the one-cent summary: dead code removal and instruction reordering can be performed without worrying too much about language-defined checks, so long as you don't use any "undefined" results (i.e., the result of an operation that failed a language-defined check) and you don't screw up external abstractions. > ... > - Bob -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA