Rationale for Ada 2005

John Barnes
Contents   Index   References   Search   Previous   Next 

6.1 Ada Issues: Exceptions, generics, etc

The areas mentioned in this chapter are not specifically mentioned in the WG9 guidance document [1] other than under the request to remedy shortcomings and improve interfacing.
The following Ada Issues cover the relevant changes and are described in detail in this chapter.
161
Preelaborable initialization
216
Unchecked unions – variants without discriminant
224
pragma Unsuppress
241
Testing for null occurrence
251
Abstract interfaces to provide multiple inheritance
257
Restrictions for implementation defined entities
260
Abstract formal subprograms & dispatching constructors
267
Fast float to integer conversion
286
Assert pragma
317
Partial parameter lists for formal packages
329
pragma No_Return – procedures that never return
340
Mod attribute
361
Raise with message
364
Fixed point multiply and divide
368
Restrictions for obsolescent features
381
New Restrictions identifier – No_Dependence
394
Redundant Restrictions identifiers and Ravenscar
398
Parameters of formal packages given at most once
400
Wide and wide-wide images
414
pragma No_Return for overriding procedures
417
Lower bound of functions in Ada.Exceptions etc
419
Limitedness of derived types
420
Resolution of universal operations in Standard
423
Renaming, null exclusion and formal objects
These changes can be grouped as follows.
First there are some minor changes to exception handling. There are neater means for testing for null occurrence and raising an exception with a message (241, 361) and also wide and wide-wide versions of some procedures (400, 417).
The numerics area has a number of small but important changes. They are the introduction of an attribute Mod to aid conversion between signed and unsigned integers (340); changes to the rules for fixed point multiplication and division which permit user-defined operations (364, 420); and an attribute Machine_Rounding which can be used to aid fast conversions from floating to integer types (267).
A number of new pragmas and Restrictions identifiers have been added. These generally make for more reliable programming. The pragmas are: Assert, No_Return, Preelaborable_Initialization, Unchecked_Union, and Unsuppress (161, 216, 224, 286, 329, 414). The restrictions identifiers are No_Dependence, No_Implementation_Pragmas, No_Implementation_Restrictions, and No_Obsolescent_Features (257, 368, 381). Note that there are also other new pragmas and new restrictions identifiers concerned with tasking as described in the previous chapter (see 5.4). However, the introduction of No_Dependence means that the identifiers No_Asynchronous_Control, No_Unchecked_Conversion and No_Unchecked_Deallocation are now obsolescent (394).
Finally there are changes in generic units. There are changes in generic parameters which are consequences of changes in other areas such as the introduction of interfaces and dispatching constructors as described in the chapter on the object oriented model (parts of 251 and 260); there are also changes to formal access and derived types (419, 423). Also, it is now possible to give just some parameters of a formal package in the generic formal part (317, 398).

Contents   Index   References   Search   Previous   Next 
© 2005, 2006, 2007 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association and its member companies: ARA Members AdaCore Polyspace Technologies Praxis Critical Systems IBM Rational Sofcheck and   Ada-Europe:
Ada-Europe