Commit b2502161 by Arnaud Charlet

[multiple changes]

2013-04-11  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
	reformatting.

2013-04-11  Thomas Quinot  <quinot@adacore.com>

	* exp_util.ads (Fully_Qualified_Name_String): Document that the
	constructed literal is the entity name in all upper case.

From-SVN: r197777
parent 83851b23
2013-04-11 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, sem_util.adb, sem_res.adb, exp_ch4.adb: Minor
reformatting.
2013-04-11 Thomas Quinot <quinot@adacore.com>
* exp_util.ads (Fully_Qualified_Name_String): Document that the
constructed literal is the entity name in all upper case.
2013-04-11 Thomas Quinot <quinot@adacore.com> 2013-04-11 Thomas Quinot <quinot@adacore.com>
* sem_util.adb (Set_Entity_With_Style_Check): Fix logic of * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
......
...@@ -10054,9 +10054,10 @@ package body Exp_Ch4 is ...@@ -10054,9 +10054,10 @@ package body Exp_Ch4 is
begin begin
-- First remove check marks put by the semantic analysis on the type -- First remove check marks put by the semantic analysis on the type
-- conversion between array types. The front end expands these checks -- conversion between array types. We need these checks, and they will
-- explicitly, so they should not be set in the tree passed to the back -- be generated by this expansion routine, but we do not depend on these
-- end. -- flags being set, and since we do intend to expand the checks in the
-- front end, we don't want them on the tree passed to the back end.
if Is_Array_Type (Target_Type) then if Is_Array_Type (Target_Type) then
if Is_Constrained (Target_Type) then if Is_Constrained (Target_Type) then
......
...@@ -440,7 +440,8 @@ package Exp_Util is ...@@ -440,7 +440,8 @@ package Exp_Util is
function Fully_Qualified_Name_String (E : Entity_Id) return String_Id; function Fully_Qualified_Name_String (E : Entity_Id) return String_Id;
-- Generates the string literal corresponding to the fully qualified name -- Generates the string literal corresponding to the fully qualified name
-- of entity E with an ASCII.NUL appended at the end of the name. -- of entity E, in all upper case, with an ASCII.NUL appended at the end
-- of the name.
procedure Generate_Poll_Call (N : Node_Id); procedure Generate_Poll_Call (N : Node_Id);
-- If polling is active, then a call to the Poll routine is built, -- If polling is active, then a call to the Poll routine is built,
......
...@@ -6722,20 +6722,21 @@ package body Sem_Prag is ...@@ -6722,20 +6722,21 @@ package body Sem_Prag is
-- pragma Abstract_State (ABSTRACT_STATE_LIST) -- pragma Abstract_State (ABSTRACT_STATE_LIST)
-- ABSTRACT_STATE_LIST ::= -- ABSTRACT_STATE_LIST ::=
-- null -- null
-- | STATE_NAME_WITH_PROPERTIES {, STATE_NAME_WITH_PROPERTIES} -- | STATE_NAME_WITH_PROPERTIES {, STATE_NAME_WITH_PROPERTIES}
-- STATE_NAME_WITH_PROPERTIES ::= -- STATE_NAME_WITH_PROPERTIES ::=
-- STATE_NAME -- STATE_NAME
-- | (STATE_NAME with PROPERTY_LIST) -- | (STATE_NAME with PROPERTY_LIST)
-- PROPERTY_LIST ::= PROPERTY {, PROPERTY} -- PROPERTY_LIST ::= PROPERTY {, PROPERTY}
-- PROPERTY ::= SIMPLE_PROPERTY -- PROPERTY ::= SIMPLE_PROPERTY | NAME_VALUE_PROPERTY
-- | NAME_VALUE_PROPERTY
-- SIMPLE_PROPERTY ::= IDENTIFIER -- SIMPLE_PROPERTY ::= IDENTIFIER
-- NAME_VALUE_PROPERTY ::= IDENTIFIER => EXPRESSION -- NAME_VALUE_PROPERTY ::= IDENTIFIER => EXPRESSION
-- STATE_NAME ::= DEFINING_IDENTIFIER
-- STATE_NAME ::= DEFINING_IDENTIFIER
when Pragma_Abstract_State => Abstract_State : declare when Pragma_Abstract_State => Abstract_State : declare
Pack_Id : Entity_Id; Pack_Id : Entity_Id;
...@@ -8878,17 +8879,18 @@ package body Sem_Prag is ...@@ -8878,17 +8879,18 @@ package body Sem_Prag is
-- pragma Depends (DEPENDENCY_RELATION); -- pragma Depends (DEPENDENCY_RELATION);
-- DEPENDENCY_RELATION ::= null -- DEPENDENCY_RELATION ::=
-- | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE} -- null
-- DEPENDENCY_CLAUSE ::= OUTPUT_LIST =>[+] INPUT_LIST -- | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}
-- OUTPUT_LIST ::= null
-- | OUTPUT -- DEPENDENCY_CLAUSE ::= OUTPUT_LIST =>[+] INPUT_LIST
-- | (OUTPUT {, OUTPUT})
-- INPUT_LIST ::= null -- OUTPUT_LIST ::= null | OUTPUT | (OUTPUT {, OUTPUT})
-- | INPUT
-- | (INPUT {, INPUT}) -- INPUT_LIST ::= null | INPUT | (INPUT {, INPUT})
-- OUTPUT ::= NAME | FUNCTION_RESULT
-- INPUT ::= NAME -- OUTPUT ::= NAME | FUNCTION_RESULT
-- INPUT ::= NAME
-- where FUNCTION_RESULT is a function Result attribute_reference -- where FUNCTION_RESULT is a function Result attribute_reference
...@@ -8918,6 +8920,7 @@ package body Sem_Prag is ...@@ -8918,6 +8920,7 @@ package body Sem_Prag is
function Entity_Of (N : Node_Id) return Entity_Id; function Entity_Of (N : Node_Id) return Entity_Id;
-- Return the entity of N or Empty. If N is a renaming, find the -- Return the entity of N or Empty. If N is a renaming, find the
-- entity of the root renamed object. -- entity of the root renamed object.
-- Surely this should not be buried here??? exp_util???
procedure Normalize_Clause (Clause : Node_Id); procedure Normalize_Clause (Clause : Node_Id);
-- Remove a self-dependency "+" from the input list of a clause. -- Remove a self-dependency "+" from the input list of a clause.
...@@ -9204,12 +9207,13 @@ package body Sem_Prag is ...@@ -9204,12 +9207,13 @@ package body Sem_Prag is
--------------- ---------------
function Entity_Of (N : Node_Id) return Entity_Id is function Entity_Of (N : Node_Id) return Entity_Id is
Id : Entity_Id := Entity (N); Id : Entity_Id;
begin begin
-- Follow a possible chain of renamings to reach the root -- Follow a possible chain of renamings to reach the root
-- renamed object. -- renamed object.
Id := Entity (N);
while Present (Renamed_Object (Id)) loop while Present (Renamed_Object (Id)) loop
if Is_Entity_Name (Renamed_Object (Id)) then if Is_Entity_Name (Renamed_Object (Id)) then
Id := Entity (Renamed_Object (Id)); Id := Entity (Renamed_Object (Id));
...@@ -9279,6 +9283,7 @@ package body Sem_Prag is ...@@ -9279,6 +9283,7 @@ package body Sem_Prag is
(List : List_Id; (List : List_Id;
Id : Entity_Id) return Boolean; Id : Entity_Id) return Boolean;
-- Determine whether List contains element Id -- Determine whether List contains element Id
-- Surely this should not be buried here??? exp_Util???
-------------- --------------
-- Contains -- -- Contains --
...@@ -10764,14 +10769,16 @@ package body Sem_Prag is ...@@ -10764,14 +10769,16 @@ package body Sem_Prag is
-- pragma Global (GLOBAL_SPECIFICATION) -- pragma Global (GLOBAL_SPECIFICATION)
-- GLOBAL_SPECIFICATION ::= null -- GLOBAL_SPECIFICATION ::=
-- | GLOBAL_LIST -- null
-- | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST} -- | GLOBAL_LIST
-- MODED_GLOBAL_LIST ::= MODE_SELECTOR => GLOBAL_LIST -- | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST}
-- MODE_SELECTOR ::= Input | Output | In_Out | Contract_In
-- GLOBAL_LIST ::= GLOBAL_ITEM -- MODED_GLOBAL_LIST ::= MODE_SELECTOR => GLOBAL_LIST
-- | (GLOBAL_ITEM {, GLOBAL_ITEM})
-- GLOBAL_ITEM ::= NAME -- MODE_SELECTOR ::= Input | Output | In_Out | Contract_In
-- GLOBAL_LIST ::= GLOBAL_ITEM | (GLOBAL_ITEM {, GLOBAL_ITEM})
-- GLOBAL_ITEM ::= NAME
when Pragma_Global => Global : declare when Pragma_Global => Global : declare
Subp_Id : Entity_Id; Subp_Id : Entity_Id;
...@@ -10780,12 +10787,11 @@ package body Sem_Prag is ...@@ -10780,12 +10787,11 @@ package body Sem_Prag is
-- A list containing the entities of all the items processed so -- A list containing the entities of all the items processed so
-- far. It plays a role in detecting distinct entities. -- far. It plays a role in detecting distinct entities.
-- Flags used to verify the consistency of modes
Contract_Seen : Boolean := False; Contract_Seen : Boolean := False;
In_Out_Seen : Boolean := False; In_Out_Seen : Boolean := False;
Input_Seen : Boolean := False; Input_Seen : Boolean := False;
Output_Seen : Boolean := False; Output_Seen : Boolean := False;
-- Flags used to verify the consistency of modes
procedure Analyze_Global_List procedure Analyze_Global_List
(List : Node_Id; (List : Node_Id;
......
...@@ -10920,9 +10920,9 @@ package body Sem_Res is ...@@ -10920,9 +10920,9 @@ package body Sem_Res is
else else
return Conversion_Check return Conversion_Check
(Is_Numeric_Type (Opnd_Type) (Is_Numeric_Type (Opnd_Type)
or else or else
(Present (Inc_Ancestor) (Present (Inc_Ancestor)
and then Is_Numeric_Type (Inc_Ancestor)), and then Is_Numeric_Type (Inc_Ancestor)),
"illegal operand for numeric conversion"); "illegal operand for numeric conversion");
end if; end if;
...@@ -10936,6 +10936,7 @@ package body Sem_Res is ...@@ -10936,6 +10936,7 @@ package body Sem_Res is
Conversion_Error_N Conversion_Error_N
("illegal operand for array conversion", Operand); ("illegal operand for array conversion", Operand);
return False; return False;
else else
return Valid_Array_Conversion; return Valid_Array_Conversion;
end if; end if;
......
...@@ -13421,8 +13421,8 @@ package body Sem_Util is ...@@ -13421,8 +13421,8 @@ package body Sem_Util is
if (Is_Implementation_Defined (Val) if (Is_Implementation_Defined (Val)
or else or else
Is_Implementation_Defined (Scope (Val))) Is_Implementation_Defined (Scope (Val)))
and then not (Ekind_In (Val, E_Package, E_Generic_Package) and then not (Ekind_In (Val, E_Package, E_Generic_Package)
and then Is_Library_Level_Entity (Val)) and then Is_Library_Level_Entity (Val))
then then
Check_Restriction (No_Implementation_Identifiers, N); Check_Restriction (No_Implementation_Identifiers, N);
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment