-- * Rec_Typ - the record type whose internals are to be validated
function Default_Streaming_Unavailable (Typ : Entity_Id) return Boolean;
- --
-- In most cases, references to unavailable streaming attributes
-- are rejected at compile time. In some obscure cases involving
-- generics and formal derived types, the problem is dealt with at runtime.
----------------------
when Attribute_Has_Same_Storage => Has_Same_Storage : declare
- Loc : constant Source_Ptr := Sloc (N);
-
- X : constant Node_Id := Prefix (N);
- Y : constant Node_Id := First (Expressions (N));
+ X : constant Node_Id := Pref;
+ Y : constant Node_Id := First (Exprs);
-- The arguments
X_Addr : Node_Id;
if Restriction_Active (No_Streams) then
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
-- case where a No_Streams restriction is active.
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
----------------------
when Attribute_Overlaps_Storage => Overlaps_Storage : declare
- Loc : constant Source_Ptr := Sloc (N);
- X : constant Node_Id := Prefix (N);
- Y : constant Node_Id := First (Expressions (N));
-
+ X : constant Node_Id := Pref;
+ Y : constant Node_Id := First (Exprs);
-- The arguments
X_Addr, Y_Addr : Node_Id;
if Restriction_Active (No_Streams) then
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, Standard_Void_Type);
return;
-- case where a No_Streams restriction is active.
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, Standard_Void_Type);
return;
when Attribute_Reduce =>
declare
- Loc : constant Source_Ptr := Sloc (N);
- E1 : constant Node_Id := First (Expressions (N));
- E2 : constant Node_Id := Next (E1);
- Bnn : constant Entity_Id := Make_Temporary (Loc, 'B', N);
+ E1 : constant Node_Id := First (Exprs);
+ E2 : constant Node_Id := Next (E1);
+ Bnn : constant Entity_Id := Make_Temporary (Loc, 'B', N);
Accum_Typ : Entity_Id := Empty;
New_Loop : Node_Id;
if Restriction_Active (No_Streams) then
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
-- case where a No_Streams restriction is active.
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, B_Type);
return;
if Restriction_Active (No_Streams) then
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, U_Type);
return;
-- case where a No_Streams restriction is active.
Rewrite (N,
- Make_Raise_Program_Error (Sloc (N),
+ Make_Raise_Program_Error (Loc,
Reason => PE_Stream_Operation_Not_Allowed));
Set_Etype (N, U_Type);
return;