+2011-08-02 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch8.adb, aspects.ads: Minor reformatting.
+
+2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
+ * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
+ extracted from...
+ (Analyze_Aspect_Specifications): ...here. Call above procedure.
+
2011-08-02 Yannick Moy <moy@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
Aspect_Universal_Data, -- GNAT
-- Remaining aspects have a static boolean value that turns the aspect
- -- on or off. They all correspond to pragmas, and the flag Aspect_Cancel
- -- is set on the pragma if the corresponding aspect is False. These are
- -- also Boolean aspects as defined below.
+ -- on or off. They all correspond to pragmas, but are only converted to
+ -- the pragmas where the value is True. A value of False normally means
+ -- that the aspect is ignored, except in the case of derived types where
+ -- the aspect value is inherited from the parent, in which case, we do
+ -- not allow False if we inherit a True value from the parent.
Aspect_Ada_2005, -- GNAT
Aspect_Ada_2012, -- GNAT
-- inherited from a derived type that is no longer appropriate for the
-- new Esize value. In this case, we reset the Alignment to unknown.
+ procedure Analyze_Non_Null_Aspect_Specifications
+ (N : Node_Id;
+ E : Entity_Id;
+ L : List_Id);
+ -- This procedure is called to analyze aspect specifications for node N.
+ -- E is the corresponding entity declared by the declaration node N, and
+ -- L is the list of aspect specifications for this node. This procedure
+ -- does the real work, as opposed to Analyze_Aspect_Specifications which
+ -- is inlined to fast-track the common case.
+
procedure Build_Predicate_Function (Typ : Entity_Id; N : Node_Id);
-- If Typ has predicates (indicated by Has_Predicates being set for Typ,
-- then either there are pragma Invariant entries on the rep chain for the
(N : Node_Id;
E : Entity_Id;
L : List_Id)
+ is
+ begin
+ -- Return if no aspects
+
+ if L = No_List then
+ return;
+ end if;
+
+ Analyze_Non_Null_Aspect_Specifications (N, E, L);
+ end Analyze_Aspect_Specifications;
+
+ --------------------------------------------
+ -- Analyze_Non_Null_Aspect_Specifications --
+ --------------------------------------------
+
+ procedure Analyze_Non_Null_Aspect_Specifications
+ (N : Node_Id;
+ E : Entity_Id;
+ L : List_Id)
is
Aspect : Node_Id;
Aitem : Node_Id;
-- Set True if delay is required
begin
- -- Return if no aspects
-
- if L = No_List then
- return;
- end if;
-
-- Loop through aspects
Aspect := First (L);
<<Continue>>
Next (Aspect);
end loop;
- end Analyze_Aspect_Specifications;
+ end Analyze_Non_Null_Aspect_Specifications;
-----------------------
-- Analyze_At_Clause --
-- the call is ignored. Note that we can't use a simpler interface of just
-- passing the node N, since the analysis of the node may cause it to be
-- rewritten to a node not permitting aspect specifications.
+ pragma Inline (Analyze_Aspect_Specifications);
procedure Adjust_Record_For_Reverse_Bit_Order (R : Entity_Id);
-- Called from Freeze where R is a record entity for which reverse bit
Mark := First (Subtype_Marks (N));
while Present (Mark) loop
Use_One_Type (Mark, Installed => True);
-
Next (Mark);
end loop;