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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9da298537a16487e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-21 21:10:53 PST Path: pad-thai.cam.ov.com!bloom-beacon.mit.edu!apollo.hp.com!lf.hp.com!hpscit.sc.hp.com!news.dtc.hp.com!col.hp.com!csn!ncar!gatech!swrinde!pipex!uunet!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Run-time checking and speed Date: 20 Jan 1995 00:11:05 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3fngl9$4iv@gnat.cs.nyu.edu> References: <3ev16u$ojc@pong.lasc.lockheed.com> <3f0prq$3bq@theopolis.orl.mmc.com> <3f3deb$4us@gnat.cs.nyu.edu> <3fa2pk$kbi@felix.seas.gwu.edu> <3fjhrj$9b3@oahu.cs.ucla.edu> Date: 1995-01-20T00:11:05-05:00 List-Id: In response to Jay's concern that global suppres may be suicidal due to some piece of code relying on checks for normal flow of control. He calls such code "pinhead" code but that is unfair. In particular, it does not seem wrong to rely on constraint error to raise constraint error. Suppose the spec of some operation requires constraint error to be raised if some condition is true. I am talking about a user packagee here. Then you may not want this to be suppressed, yet it may well be the case that you use constraint checking to achieve the constraint checking so to speak. An examlple is raising time_error in calendar. You probably do not want this suppressed by turning checks off, yet in Ada 95, calendar has been carefully tweaked to invite you to get time error by raising a constraint error on a normal arithmetic operation (this was not possible in Ada 83 due to minor glitches). In GNAT, we have introduced an implementation defined pragma Unsuppress that undoes a previous suppression, including one applied by command line argument, precisely to deal with this kind of situation, so a module that REALLY needs checks should contain a pragma Unsuppress.