comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Run-time checking and speed
Date: 20 Jan 1995 00:11:05 -0500
Date: 1995-01-20T00:11:05-05:00	[thread overview]
Message-ID: <3fngl9$4iv@gnat.cs.nyu.edu> (raw)
In-Reply-To: 3fjhrj$9b3@oahu.cs.ucla.edu

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.




  parent reply	other threads:[~1995-01-20  5:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-01-10 22:20 Run-time checking and speed Tony Leavitt
1995-01-12  1:14 ` Roger Labbe
1995-01-13 12:09   ` Philip Brashear
     [not found] ` <3f0prq$3bq@theopolis.orl.mmc.com>
1995-01-12 14:13   ` Robert Dewar
1995-01-13  1:49     ` Doug Smith
1995-01-13 15:29       ` Norman H. Cohen
1995-01-13 15:21     ` Norman H. Cohen
     [not found]     ` <3fa2pk$kbi@felix.seas.gwu.edu>
     [not found]       ` <EACHUS.95Jan17151835@spectre.mitre.org>
     [not found]         ` <3fjhrj$9b3@oahu.cs.ucla.edu>
1995-01-20  5:11           ` Robert Dewar [this message]
1995-01-23 16:43             ` Mats Weber
1995-01-24 19:25               ` Robert Dewar
1995-01-22 18:43         ` Michael Feldman
1995-01-23 23:38           ` Robert Dewar
1995-01-26 16:14             ` Kent Mitchell
1995-01-28  6:03               ` Robert Dewar
     [not found]             ` <3gbr4f$p4b@theopolis.orl.mmc.com>
1995-01-29 13:00               ` Robert Dewar
1995-01-30 19:21                 ` Garlington KE
1995-01-12 15:11 ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1995-01-12 15:54 Keith Arthurs
replies disabled

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