]> gcc.gnu.org Git - gcc.git/commitdiff
[Ada] Address some ??? comments
authorArnaud Charlet <charlet@adacore.com>
Tue, 5 Jan 2021 13:05:12 +0000 (08:05 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 4 May 2021 09:17:32 +0000 (05:17 -0400)
gcc/ada/

* cstand.adb, sprint.adb, switch-c.adb, xr_tabls.ads,
xr_tabls.adb, xref_lib.adb: Address ??? comments.

gcc/ada/cstand.adb
gcc/ada/sprint.adb
gcc/ada/switch-c.adb
gcc/ada/xr_tabls.adb
gcc/ada/xr_tabls.ads
gcc/ada/xref_lib.adb

index 092e64a71a9b9e2c378dabac37901dfe788af49b..d15708bdbba7ea51ff8a8080c7418dab39e610fe 100644 (file)
@@ -817,7 +817,7 @@ package body CStand is
 
       B_Node := New_Node (N_Character_Literal, Stloc);
       Set_Is_Static_Expression (B_Node);
-      Set_Chars                (B_Node, No_Name);    --  ???
+      Set_Chars                (B_Node, No_Name);
       Set_Char_Literal_Value   (B_Node, Uint_0);
       Set_Entity               (B_Node, Empty);
       Set_Etype                (B_Node, Standard_Wide_Character);
@@ -827,7 +827,7 @@ package body CStand is
 
       B_Node := New_Node (N_Character_Literal, Stloc);
       Set_Is_Static_Expression (B_Node);
-      Set_Chars                (B_Node, No_Name);    --  ???
+      Set_Chars                (B_Node, No_Name);
       Set_Char_Literal_Value   (B_Node, UI_From_Int (16#FFFF#));
       Set_Entity               (B_Node, Empty);
       Set_Etype                (B_Node, Standard_Wide_Character);
@@ -866,7 +866,7 @@ package body CStand is
 
       B_Node := New_Node (N_Character_Literal, Stloc);
       Set_Is_Static_Expression (B_Node);
-      Set_Chars                (B_Node, No_Name);    --  ???
+      Set_Chars                (B_Node, No_Name);
       Set_Char_Literal_Value   (B_Node, Uint_0);
       Set_Entity               (B_Node, Empty);
       Set_Etype                (B_Node, Standard_Wide_Wide_Character);
@@ -876,7 +876,7 @@ package body CStand is
 
       B_Node := New_Node (N_Character_Literal, Stloc);
       Set_Is_Static_Expression (B_Node);
-      Set_Chars                (B_Node, No_Name);    --  ???
+      Set_Chars                (B_Node, No_Name);
       Set_Char_Literal_Value   (B_Node, UI_From_Int (16#7FFF_FFFF#));
       Set_Entity               (B_Node, Empty);
       Set_Etype                (B_Node, Standard_Wide_Wide_Character);
index 57132aeba8fc2d936380adc1a80a5c195c7dc67b..213b63171060f6c4b55e9da097273c9befde9d74 100644 (file)
@@ -3132,11 +3132,6 @@ package body Sprint is
 
             Write_Char (';');
 
-         --  Don't we want to print more detail???
-
-         --  Doc of this extended syntax belongs in sinfo.ads and/or
-         --  sprint.ads ???
-
          when N_SCIL_Dispatch_Table_Tag_Init =>
             Write_Indent_Str ("[N_SCIL_Dispatch_Table_Tag_Init]");
 
@@ -4578,7 +4573,8 @@ package body Sprint is
                         Write_Str (");");
                      end;
 
-                  --  For all other Itypes, print ??? (fill in later)
+                  --  For all other Itypes, print a triple ? (fill in later
+                  --  if needed).
 
                   when others =>
                      Write_Header (True);
index b97e0d6e55389f976f1ae9b5c25dd2df7112587b..1e94aded0851f2dc4fc59e8e63f8c1d26c795421 100644 (file)
@@ -427,7 +427,7 @@ package body Switch.C is
                --  The reason for this prohibition is that the rewriting of
                --  Sloc values causes strange malfunctions in the tests of
                --  whether units belong to the main source. This is really a
-               --  bug, but too hard to fix for a marginal capability ???
+               --  bug, but too hard to fix for a marginal capability.
 
                --  The proper fix is to completely redo -gnatD processing so
                --  that the tree is not messed with, and instead a separate
@@ -1613,11 +1613,6 @@ package body Switch.C is
                   Ptr := Ptr + 1;
                end if;
 
-            --  We ignore '/' in switches, this is historical, still needed???
-
-            when '/' =>
-               Store_Switch := False;
-
             --  Anything else is an error (illegal switch character)
 
             when others =>
index 6d002011d3f3a0fda8a018d5b04f5ba6ef969d0f..a4c52d0ab9b01cbc33505738781fd663c1eaac5c 100644 (file)
@@ -106,10 +106,16 @@ package body Xr_Tabls is
    --  when sorting the table.
 
    Longest_File_Name_In_Table : Natural := 0;
-   Unvisited_Files            : Unvisited_Files_Access := null;
-   Directories                : Project_File_Ptr;
-   Default_Match              : Boolean := False;
-   --  The above need commenting ???
+   --  The length of the longest file name stored
+
+   Unvisited_Files : Unvisited_Files_Access := null;
+   --  Linked list of unvisited files
+
+   Directories : Project_File_Ptr;
+   --  Store the list of directories to visit
+
+   Default_Match : Boolean := False;
+   --  Default value for match in declarations
 
    function Parse_Gnatls_Src return String;
    --  Return the standard source directories (taking into account the
@@ -482,9 +488,8 @@ package body Xr_Tabls is
    -------------------
 
    function ALI_File_Name (Ada_File_Name : String) return String is
-
-      --  ??? Should ideally be based on the naming scheme defined in
-      --  project files.
+      --  Should ideally be based on the naming scheme defined in
+      --  project files but this is too late for an obsolescent feature.
 
       Index : constant Natural :=
                 Ada.Strings.Fixed.Index
@@ -762,7 +767,7 @@ package body Xr_Tabls is
       Strip    : Natural    := 0) return String
    is
       pragma Annotate (CodePeer, Skip_Analysis);
-      --  ??? To disable false positives currently generated
+      --  Disable CodePeer false positives
 
       Tmp : GNAT.OS_Lib.String_Access;
 
@@ -1385,8 +1390,8 @@ package body Xr_Tabls is
    begin
       File_Ref.Visited := False;
 
-      --  ??? Do not add a source file to the list. This is true at
-      --  least for gnatxref, and probably for gnatfind as well
+      --  Do not add a source file to the list. This is true for gnatxref
+      --  gnatfind, so good enough.
 
       if F'Length > 4
         and then F (F'Last - 3 .. F'Last) = "." & Osint.ALI_Suffix.all
index b290afb98f3d64360269fe10eb9186faa2b42437..2f4dea0903c937195d5b2a565c6cf15062a8279c 100644 (file)
@@ -23,7 +23,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  We need comment here saying what this package is???
+--  Cross reference utilities used by gnatxref and gnatfind
 
 with GNAT.OS_Lib;
 
index 1f667cbd505185295a0d20e8871239de1018ea5f..9a584a454a7397659b1cbd59fbfa8a3012db4cd5 100644 (file)
@@ -786,7 +786,7 @@ package body Xref_Lib is
       --  line and column in the dependent unit number Eun. For this we need
       --  to parse the ali file again because the parent entity is not in
       --  the declaration table if it did not match the search pattern.
-      --  If the symbol is not found, we return "???".
+      --  If the symbol is not found, we return (1 .. 3 => '?').
 
       procedure Skip_To_Matching_Closing_Bracket;
       --  When Ptr points to an opening square bracket, moves it to the
This page took 0.122773 seconds and 5 git commands to generate.