First_Component (Base_Type (Underlying_Type (Etype (Typ))));
Comp := First_Component (Typ);
while Present (Comp) loop
- if Ekind (Comp) = E_Component
- and then Chars (Comp) = Chars (Old_Comp)
- then
+ if Chars (Comp) = Chars (Old_Comp) then
Set_Discriminant_Checking_Func
(Comp, Discriminant_Checking_Func (Old_Comp));
end if;
Comp := First_Component (Full_Type);
while Present (Comp) loop
- if Ekind (Comp) = E_Component
- and then Present (Expression (Parent (Comp)))
+ if Present (Expression (Parent (Comp)))
and then
not Is_OK_Static_Expression (Expression (Parent (Comp)))
then
Comp := First_Component (Full_Type);
while Present (Comp) loop
- if Ekind (Comp) = E_Component
- and then Present (Expression (Parent (Comp)))
- then
+ if Present (Expression (Parent (Comp))) then
Append_To (Component_Associations (Aggr),
Make_Component_Association (Loc,
Choices => New_List (New_Occurrence_Of (Comp, Loc)),
begin
Comp := First_Component (E);
while Present (Comp) loop
- if Ekind (Comp) = E_Discriminant
- or else
- (Nkind (Parent (Comp)) = N_Component_Declaration
- and then Present (Expression (Parent (Comp))))
- then
+ pragma Assert
+ (Nkind (Parent (Comp)) = N_Component_Declaration);
+
+ if Present (Expression (Parent (Comp))) then
Warning_Needed := True;
exit;
end if;
begin
Comp := First_Component (E);
while Present (Comp) loop
- Typ := Etype (Comp);
+ Typ := Etype (Comp);
- if Ekind (Comp) = E_Component
- and then Is_Access_Type (Typ)
+ if Is_Access_Type (Typ)
and then Scope (Typ) /= E
and then Base_Type (Designated_Type (Typ)) = E
and then Is_Itype (Designated_Type (Typ))