OSDN Git Service

2013-04-11 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2013 12:40:12 +0000 (12:40 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2013 12:40:12 +0000 (12:40 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197777 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/exp_util.ads
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb

index cb50285..7962be4 100644 (file)
@@ -1,3 +1,13 @@
+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>
 
        * sem_util.adb (Set_Entity_With_Style_Check): Fix logic of
index 480151d..be5d17f 100644 (file)
@@ -10054,9 +10054,10 @@ package body Exp_Ch4 is
 
    begin
       --  First remove check marks put by the semantic analysis on the type
-      --  conversion between array types. The front end expands these checks
-      --  explicitly, so they should not be set in the tree passed to the back
-      --  end.
+      --  conversion between array types. We need these checks, and they will
+      --  be generated by this expansion routine, but we do not depend on these
+      --  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_Constrained (Target_Type) then
index ce64345..67982c2 100644 (file)
@@ -440,7 +440,8 @@ package Exp_Util is
 
    function Fully_Qualified_Name_String (E : Entity_Id) return String_Id;
    --  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);
    --  If polling is active, then a call to the Poll routine is built,
index 806199c..94ea59e 100644 (file)
@@ -6722,20 +6722,21 @@ package body Sem_Prag is
 
          --  pragma Abstract_State (ABSTRACT_STATE_LIST)
 
-         --  ABSTRACT_STATE_LIST        ::=
+         --  ABSTRACT_STATE_LIST ::=
          --    null
-         --    | STATE_NAME_WITH_PROPERTIES {, STATE_NAME_WITH_PROPERTIES}
+         --  | STATE_NAME_WITH_PROPERTIES {, STATE_NAME_WITH_PROPERTIES}
 
          --  STATE_NAME_WITH_PROPERTIES ::=
          --    STATE_NAME
-         --    | (STATE_NAME with PROPERTY_LIST)
+         --  | (STATE_NAME with PROPERTY_LIST)
 
-         --  PROPERTY_LIST              ::= PROPERTY {, PROPERTY}
-         --  PROPERTY                   ::= SIMPLE_PROPERTY
-         --                               | NAME_VALUE_PROPERTY
-         --  SIMPLE_PROPERTY            ::= IDENTIFIER
-         --  NAME_VALUE_PROPERTY        ::= IDENTIFIER => EXPRESSION
-         --  STATE_NAME                 ::= DEFINING_IDENTIFIER
+         --  PROPERTY_LIST ::= PROPERTY {, PROPERTY}
+         --  PROPERTY      ::= SIMPLE_PROPERTY | NAME_VALUE_PROPERTY
+
+         --  SIMPLE_PROPERTY      ::= IDENTIFIER
+         --  NAME_VALUE_PROPERTY  ::= IDENTIFIER => EXPRESSION
+
+         --  STATE_NAME ::= DEFINING_IDENTIFIER
 
          when Pragma_Abstract_State => Abstract_State : declare
             Pack_Id : Entity_Id;
@@ -8878,17 +8879,18 @@ package body Sem_Prag is
 
          --  pragma Depends (DEPENDENCY_RELATION);
 
-         --  DEPENDENCY_RELATION ::= null
-         --                        | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}
-         --  DEPENDENCY_CLAUSE   ::= OUTPUT_LIST =>[+] INPUT_LIST
-         --  OUTPUT_LIST         ::= null
-         --                        | OUTPUT
-         --                        | (OUTPUT {, OUTPUT})
-         --  INPUT_LIST          ::= null
-         --                        | INPUT
-         --                        | (INPUT {, INPUT})
-         --  OUTPUT              ::= NAME | FUNCTION_RESULT
-         --  INPUT               ::= NAME
+         --  DEPENDENCY_RELATION ::=
+         --    null
+         --  | DEPENDENCY_CLAUSE {, DEPENDENCY_CLAUSE}
+
+         --  DEPENDENCY_CLAUSE ::= OUTPUT_LIST =>[+] INPUT_LIST
+
+         --  OUTPUT_LIST ::= null | OUTPUT | (OUTPUT {, OUTPUT})
+
+         --  INPUT_LIST ::= null | INPUT | (INPUT {, INPUT})
+
+         --  OUTPUT ::= NAME | FUNCTION_RESULT
+         --  INPUT  ::= NAME
 
          --  where FUNCTION_RESULT is a function Result attribute_reference
 
@@ -8918,6 +8920,7 @@ package body Sem_Prag is
             function Entity_Of (N : Node_Id) return Entity_Id;
             --  Return the entity of N or Empty. If N is a renaming, find the
             --  entity of the root renamed object.
+            --  Surely this should not be buried here??? exp_util???
 
             procedure Normalize_Clause (Clause : Node_Id);
             --  Remove a self-dependency "+" from the input list of a clause.
@@ -9204,12 +9207,13 @@ package body Sem_Prag is
             ---------------
 
             function Entity_Of (N : Node_Id) return Entity_Id is
-               Id : Entity_Id := Entity (N);
+               Id : Entity_Id;
 
             begin
                --  Follow a possible chain of renamings to reach the root
                --  renamed object.
 
+               Id := Entity (N);
                while Present (Renamed_Object (Id)) loop
                   if Is_Entity_Name (Renamed_Object (Id)) then
                      Id := Entity (Renamed_Object (Id));
@@ -9279,6 +9283,7 @@ package body Sem_Prag is
                        (List : List_Id;
                         Id   : Entity_Id) return Boolean;
                      --  Determine whether List contains element Id
+                     --  Surely this should not be buried here??? exp_Util???
 
                      --------------
                      -- Contains --
@@ -10764,14 +10769,16 @@ package body Sem_Prag is
 
          --  pragma Global (GLOBAL_SPECIFICATION)
 
-         --  GLOBAL_SPECIFICATION ::= null
-         --                         | GLOBAL_LIST
-         --                         | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST}
-         --  MODED_GLOBAL_LIST    ::= MODE_SELECTOR => GLOBAL_LIST
-         --  MODE_SELECTOR        ::= Input | Output | In_Out | Contract_In
-         --  GLOBAL_LIST          ::= GLOBAL_ITEM
-         --                         | (GLOBAL_ITEM {, GLOBAL_ITEM})
-         --  GLOBAL_ITEM          ::= NAME
+         --  GLOBAL_SPECIFICATION ::=
+         --    null
+         --  | GLOBAL_LIST
+         --  | MODED_GLOBAL_LIST {, MODED_GLOBAL_LIST}
+
+         --  MODED_GLOBAL_LIST ::= MODE_SELECTOR => GLOBAL_LIST
+
+         --  MODE_SELECTOR ::= Input | Output | In_Out | Contract_In
+         --  GLOBAL_LIST   ::= GLOBAL_ITEM | (GLOBAL_ITEM {, GLOBAL_ITEM})
+         --  GLOBAL_ITEM   ::= NAME
 
          when Pragma_Global => Global : declare
             Subp_Id : Entity_Id;
@@ -10780,12 +10787,11 @@ package body Sem_Prag is
             --  A list containing the entities of all the items processed so
             --  far. It plays a role in detecting distinct entities.
 
-            --  Flags used to verify the consistency of modes
-
             Contract_Seen : Boolean := False;
             In_Out_Seen   : Boolean := False;
             Input_Seen    : Boolean := False;
             Output_Seen   : Boolean := False;
+            --  Flags used to verify the consistency of modes
 
             procedure Analyze_Global_List
               (List        : Node_Id;
index 36d64bb..c93b752 100644 (file)
@@ -10920,9 +10920,9 @@ package body Sem_Res is
          else
             return Conversion_Check
                     (Is_Numeric_Type (Opnd_Type)
-                       or else
-                         (Present (Inc_Ancestor)
-                           and then Is_Numeric_Type (Inc_Ancestor)),
+                      or else
+                        (Present (Inc_Ancestor)
+                          and then Is_Numeric_Type (Inc_Ancestor)),
                      "illegal operand for numeric conversion");
          end if;
 
@@ -10936,6 +10936,7 @@ package body Sem_Res is
             Conversion_Error_N
               ("illegal operand for array conversion", Operand);
             return False;
+
          else
             return Valid_Array_Conversion;
          end if;
index 2892c88..1be6c84 100644 (file)
@@ -13421,8 +13421,8 @@ package body Sem_Util is
          if (Is_Implementation_Defined (Val)
                or else
              Is_Implementation_Defined (Scope (Val)))
-              and then not (Ekind_In (Val, E_Package, E_Generic_Package)
-                              and then Is_Library_Level_Entity (Val))
+           and then not (Ekind_In (Val, E_Package, E_Generic_Package)
+                          and then Is_Library_Level_Entity (Val))
          then
             Check_Restriction (No_Implementation_Identifiers, N);
          end if;