+2012-10-02 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch4.adb (Expand_N_Case_Expression): Do not introduce
+ indirections when the type of the alternatives is an access type:
+ more efficient, and removes anomalies when an alternative is
+ statically null.
+
+2012-10-02 Robert Dewar <dewar@adacore.com>
+
+ * aspects.ads: Minor comment addition (Invariant is a GNAT aspect).
+
2012-10-02 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb, sem_dim.adb, sem_dim.ads, prj-part.adb, checks.adb,
Aspect_Implicit_Dereference,
Aspect_Input,
Aspect_Interrupt_Priority,
- Aspect_Invariant,
+ Aspect_Invariant, -- GNAT
Aspect_Iterator_Element,
Aspect_Link_Name,
Aspect_Machine_Radix,
-- wrong for unconstrained types (since the bounds may not be the
-- same in all branches). Furthermore it involves an extra copy
-- for large objects. So we take care of this by using the following
- -- modified expansion for non-scalar types:
+ -- modified expansion for non-elementary types:
-- do
-- type Pnn is access all typ;
-- Scalar case
- if Is_Scalar_Type (Typ) then
+ if Is_Elementary_Type (Typ) then
Ttyp := Typ;
else
-- As described above, take Unrestricted_Access for case of non-
-- scalar types, to avoid big copies, and special cases.
- if not Is_Scalar_Type (Typ) then
+ if not Is_Elementary_Type (Typ) then
Aexp :=
Make_Attribute_Reference (Aloc,
Prefix => Relocate_Node (Aexp),
-- Construct and return final expression with actions
- if Is_Scalar_Type (Typ) then
+ if Is_Elementary_Type (Typ) then
Fexp := New_Occurrence_Of (Tnn, Loc);
else
Fexp :=