Set_Is_Pure (Standard_Standard);
Set_Is_Compilation_Unit (Standard_Standard);
- -- Create type/subtype declaration nodes for standard types
+ -- Create type declaration nodes for standard types
for S in S_Types loop
-
- -- Subtype declaration case
-
- if S = S_Natural or else S = S_Positive then
- Decl := New_Node (N_Subtype_Declaration, Stloc);
- Set_Subtype_Indication (Decl,
- New_Occurrence_Of (Standard_Integer, Stloc));
-
- -- Full type declaration case
-
- else
+ if S not in S_Natural | S_Positive then
Decl := New_Node (N_Full_Type_Declaration, Stloc);
+ Set_Defining_Identifier (Decl, Standard_Entity (S));
+ Append (Decl, Decl_S);
end if;
-
- Set_Defining_Identifier (Decl, Standard_Entity (S));
- Append (Decl, Decl_S);
end loop;
Create_Back_End_Float_Types;
Hb => Intval (High_Bound (Scalar_Range (Standard_Integer))));
Set_Is_Constrained (Standard_Natural);
+ Append_To
+ (Decl_S,
+ Make_Subtype_Declaration
+ (Stloc,
+ Standard_Natural,
+ Subtype_Indication =>
+ New_Occurrence_Of (Standard_Integer, Stloc)));
+
-- Setup entity for Positive
Mutate_Ekind (Standard_Positive, E_Signed_Integer_Subtype);
Hb => Intval (High_Bound (Scalar_Range (Standard_Integer))));
Set_Is_Constrained (Standard_Positive);
+ Append_To
+ (Decl_S,
+ Make_Subtype_Declaration
+ (Stloc,
+ Standard_Positive,
+ Subtype_Indication =>
+ New_Occurrence_Of (Standard_Integer, Stloc)));
+
-- Create declaration for package ASCII
Decl := New_Node (N_Package_Declaration, Stloc);