+2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_attr.adb, freeze.adb, sem_util.adb, sem_ch13.adb: Minor
+ reformatting.
+
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Compile_Stream_Body_In_Scope): When compiling
Arr : Entity_Id;
Check : Boolean)
is
- C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
- Curr : constant Entity_Id := Current_Scope;
-
- Install : Boolean := False;
- Scop : Entity_Id := Scope (Arr);
+ C_Type : constant Entity_Id := Base_Type (Component_Type (Arr));
+ Curr : constant Entity_Id := Current_Scope;
+ Install : Boolean := False;
+ Scop : Entity_Id := Scope (Arr);
begin
if Is_Hidden (Arr)
and then Ekind (Scop) = E_Package
then
Install := True;
- else
- -- The component type may be private, in which case we install
- -- its full view to compile the subprogram.
+ else
+ -- The component type may be private, in which case we install its
+ -- full view to compile the subprogram.
Scop := Scope (C_Type);
-- If we are within an instance body, then all visibility has been
-- established already and there is no need to install the package.
- if Install
- and then not In_Instance_Body
- then
+ if Install and then not In_Instance_Body then
Push_Scope (Scop);
Install_Visible_Declarations (Scop);
Install_Private_Declarations (Scop);
-- later for the variable if it is assigned.
if (Ekind (E) = E_Variable
- or else (Ekind (E) = E_Constant
- and then not Is_Imported (E)))
+ or else (Ekind (E) = E_Constant
+ and then not Is_Imported (E)))
and then Overlays_Constant (E)
and then Present (Init)
then
declare
O_Ent : Entity_Id;
Off : Boolean;
+
begin
Find_Overlaid_Entity (Addr, O_Ent, Off);
if Ekind (O_Ent) = E_Constant
and then Etype (O_Ent) = Typ
and then Present (Constant_Value (O_Ent))
- and then Compile_Time_Compare (
- Init,
- Constant_Value (O_Ent),
- Assume_Valid => True) = EQ
+ and then Compile_Time_Compare
+ (Init,
+ Constant_Value (O_Ent),
+ Assume_Valid => True) = EQ
then
Set_No_Initialization (Decl);
return;
Find_Overlaid_Entity (N, O_Ent, Off);
if Present (O_Ent) then
+
-- If the object overlays a constant object, mark it so
if Is_Constant_Object (O_Ent) then
Set_Overlays_Constant (U_Ent);
end if;
+
else
-- If this is not an overlay, mark a variable as being
-- volatile to prevent unwanted optimizations. It's a
end if;
end if;
- -- Overlaying controlled objects is erroneous.
- -- Emit warning but continue analysis because program is
- -- itself legal, and back-end must see address clause.
+ -- Overlaying controlled objects is erroneous. Emit warning
+ -- but continue analysis because program is itself legal,
+ -- and back-end must see address clause.
if Present (O_Ent)
and then (Has_Controlled_Component (Etype (O_Ent))
Addr : constant Node_Id := Address_Clause (Ent);
O_Ent : Entity_Id;
Off : Boolean;
+
begin
Find_Overlaid_Entity (Addr, O_Ent, Off);