OSDN Git Service

2011-08-02 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2011 14:30:35 +0000 (14:30 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2011 14:30:35 +0000 (14:30 +0000)
* gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
Minor reformatting.

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

gcc/ada/ChangeLog
gcc/ada/a-tags.ads
gcc/ada/exp_disp.adb
gcc/ada/gnat_rm.texi
gcc/ada/sem_ch12.adb
gcc/ada/sem_prag.adb

index f09f47d..41cc29b 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-02  Robert Dewar  <dewar@adacore.com>
+
+       * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
+       Minor reformatting.
+
 2011-08-02  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
index e9ac33a..3d415a0 100644 (file)
@@ -304,10 +304,10 @@ private
       --  abstract interface type conversions (Ada 2005:AI-251)
 
       SSD : Select_Specific_Data_Ptr;
-      --  Pointer to a table of records used in dispatching selects. This
-      --  field has a meaningful value for all tagged types that implement
-      --  a limited, protected, synchronized or task interfaces and have
-      --  non-predefined primitive operations.
+      --  Pointer to a table of records used in dispatching selects. This field
+      --  has a meaningful value for all tagged types that implement a limited,
+      --  protected, synchronized or task interfaces and have non-predefined
+      --  primitive operations.
 
       Tags_Table : Tag_Table (0 .. Idepth);
       --  Table of ancestor tags. Its size actually depends on the inheritance
@@ -414,12 +414,12 @@ private
    type Object_Specific_Data_Ptr is access all Object_Specific_Data;
    pragma No_Strict_Aliasing (Object_Specific_Data_Ptr);
 
-   --  The following subprogram specifications are placed here instead of
-   --  the package body to see them from the frontend through rtsfind.
+   --  The following subprogram specifications are placed here instead of the
+   --  package body to see them from the frontend through rtsfind.
 
    function Base_Address (This : System.Address) return System.Address;
-   --  Ada 2005 (AI-251): Displace "This" to point to the base address of
-   --  the object (that is, the address of the primary tag of the object).
+   --  Ada 2005 (AI-251): Displace "This" to point to the base address of the
+   --  object (that is, the address of the primary tag of the object).
 
    procedure Check_TSD (TSD : Type_Specific_Data_Ptr);
    --  Ada 2012 (AI-113): Raise Program_Error if the external tag of this TSD
@@ -444,8 +444,8 @@ private
    function Get_Offset_Index
      (T        : Tag;
       Position : Positive) return Positive;
-   --  Ada 2005 (AI-251): Given a pointer to a secondary dispatch table (T) and
-   --  a position of an operation in the DT, retrieve the corresponding
+   --  Ada 2005 (AI-251): Given a pointer to a secondary dispatch table (T)
+   --  and a position of an operation in the DT, retrieve the corresponding
    --  operation's position in the primary dispatch table from the Offset
    --  Specific Data table of T.
 
@@ -460,9 +460,9 @@ private
    --  has controlled components, returns zero if no controlled components.
 
    pragma Export (Ada, Get_RC_Offset, "ada__tags__get_rc_offset");
-   --  This procedure is used in s-finimp to compute the deep routines
-   --  it is exported manually in order to avoid changing completely the
-   --  organization of the run time.
+   --  This procedure is used in s-finimp to compute the deep routines. It is
+   --  exported manually in order to avoid completely changing the organization
+   --  of the run time.
 
    function Get_Tagged_Kind (T : Tag) return Tagged_Kind;
    --  Ada 2005 (AI-345): Given a pointer to either a primary or a secondary
@@ -485,7 +485,7 @@ private
 
    function Offset_To_Top
      (This : System.Address) return SSE.Storage_Offset;
-   --  Ada 2005 (AI-251): Returns the current value of the offset_to_top
+   --  Ada 2005 (AI-251): Returns the current value of the Offset_To_Top
    --  component available in the prologue of the dispatch table. If the parent
    --  of the tagged type has discriminants this value is stored in a record
    --  component just immediately after the tag component.
@@ -516,8 +516,8 @@ private
    --  access to function that must be called to evaluate the offset.
 
    procedure Register_Tag (T : Tag);
-   --  Insert the Tag and its associated external_tag in a table for the
-   --  sake of Internal_Tag
+   --  Insert the Tag and its associated external_tag in a table for the sake
+   --  of Internal_Tag.
 
    procedure Set_Dynamic_Offset_To_Top
      (This         : System.Address;
index cdc92a3..7ebd439 100644 (file)
@@ -5995,6 +5995,8 @@ package body Exp_Disp is
 
       --     Check_TSD (TSD'Unrestricted_Access);
 
+      --  Seems wrong to restrict this BI to Ada 2012 ???
+
       if not No_Run_Time_Mode
         and then Ada_Version >= Ada_2012
         and then RTE_Available (RE_Check_TSD)
index a2c8636..5d5d855 100644 (file)
@@ -4562,7 +4562,8 @@ Note that Source_File_Name pragmas should not be used if you are using
 project files. The reason for this rule is that the project manager is not
 aware of these pragmas, and so other tools that use the projet file would not
 be aware of the intended naming conventions. If you are using project files,
-file naming is controlled by Source_File_Name_Project pragmas. A pragma
+file naming is controlled by Source_File_Name_Project pragmas, which are
+usually supplied automatically by the project manager. A pragma
 Source_File_Name cannot appear after a @ref{Pragma Source_File_Name_Project}.
 
 For more details on the use of the @code{Source_File_Name} pragma,
index cfcd296..22c8bc3 100644 (file)
@@ -2905,6 +2905,7 @@ package body Sem_Ch12 is
       --  To capture global references, analyze the expressions of aspects,
       --  and propagate information to original tree. Note that in this case
       --  analysis of attributes is not delayed until the freeze point.
+
       --  It seems very hard to recreate the proper visibility of the generic
       --  subprogram at a later point because the analysis of an aspect may
       --  create pragmas after the generic copies have been made ???
@@ -4303,9 +4304,9 @@ package body Sem_Ch12 is
              Specification => Act_Spec);
 
          --  The aspects have been copied previously, but they have to be
-         --  linked explicitly to the new subprogram declaration.
-         --  Explicit pre/postconditions on the instance are analyzed below,
-         --  in a separate step.
+         --  linked explicitly to the new subprogram declaration. Explicit
+         --  pre/postconditions on the instance are analyzed below, in a
+         --  separate step.
 
          Move_Aspects (Act_Tree, Act_Decl);
          Set_Categorization_From_Pragmas (Act_Decl);
index 20e5191..5bcb4a9 100644 (file)
@@ -1595,9 +1595,12 @@ package body Sem_Prag is
                     ("aspect % requires ''Class for abstract subprogram");
                end if;
 
-            --  AI05-0230:  the same restriction applies to null procedures.
-            --  For compatibility with earlier uses of the Ada pragma, apply
-            --  this rule only to aspect specifications.
+            --  AI05-0230: The same restriction applies to null procedures. For
+            --  compatibility with earlier uses of the Ada pragma, apply this
+            --  rule only to aspect specifications.
+
+            --  The above discrpency needs documentation. Robert is dubious
+            --  about whether it is a good idea ???
 
             elsif Nkind (PO) = N_Subprogram_Declaration
               and then Nkind (Specification (PO)) = N_Procedure_Specification
@@ -1752,7 +1755,7 @@ package body Sem_Prag is
 
             elsif not Comes_From_Source (PO) then
 
-               --  The condition may apply to a subprogram instantiation.
+               --  The condition may apply to a subprogram instantiation
 
                if Nkind (PO) = N_Subprogram_Declaration
                  and then Present (Generic_Parent (Specification (PO)))
@@ -1760,6 +1763,8 @@ package body Sem_Prag is
                   Chain_PPC (PO);
                   return;
 
+               --  For all other cases of non source code, do nothing
+
                else
                   null;
                end if;