aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/osint.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-01-05 14:16:00 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-04 05:17:32 -0400
commit0964be0713f6c9a9e6a2a0a3efe869b7570dc9ce (patch)
tree8228d4ef814957d9ba4ec518088a091d8bdf4629 /gcc/ada/osint.adb
parent86a9605014f424c556032c2c1586cbfbc4b72131 (diff)
downloadgcc-0964be0713f6c9a9e6a2a0a3efe869b7570dc9ce.zip
gcc-0964be0713f6c9a9e6a2a0a3efe869b7570dc9ce.tar.gz
gcc-0964be0713f6c9a9e6a2a0a3efe869b7570dc9ce.tar.bz2
[Ada] Clean up ??? marks
gcc/ada/ * binde.adb: No need for ??? marks in Binde, because it is superseded by Bindo. * bindo-writers.adb (Write_Unit_Closure): Verified that -Ra works. * exp_ch4.adb, sinfo.ads (Expand_N_Type_Conversion): Rules for conversions passed to gigi are documented in sinfo.ads. (Expand_N_Unchecked_Type_Conversion): Comment is a duplicate of one in sinfo.ads. (Expand_N_In): Robert already added sufficient comments years after the ??? comment was inserted. (Expand_Membership_Minimize_Eliminate_Overflow): I don't see any reason why Stand should export Long_Long_Integer'Base -- it doesn't export any other base types. (Size_In_Storage_Elements): We are doing an allocator, so we don't care about sizes in bits. (Expand_N_Allocator): PolyORB isn't going to be significantly improved, so we're not going to mess with remote access to class-wide types. (Optimize_Return_Stmt): It's not important to optimize return statements in predicate functions -- there are many more-important optimizations we could do. Keep part of the comment without "???", to clarify why the "and then ...". (User_Defined_Primitive_Equality_Op): The optimization doesn't seem important enough. (Expand_N_Unchecked_Type_Conversion): Refactor to use Expand_N_Unchecked_Expression. (Make_Array_Comparison_Op): This seems like a case of "it it's not broken, don't fix it". Too much risk of causing bugs. * debug_a.adb: Remove ??? comments asking why Current_Error_Node is maintained unconditionally, and add a comment explaining why. * errout.adb: These kinds of minor bugs do indeed exist, but we're never going to get around to fixing them "properly", so we need this code for robustness. * gnatchop.adb (Read_File): Document when read can fail. * gnatdll.adb (Parse_Command_Line): Nobody is complaining about these arbitrary limits, so no need to use Table. Increase the limits just in case. It is clear from the names what they are limits on. * gnatlink.adb: Add needed comments. (Delete): An existing comment makes clear it's intentional, and it's been like that since 1996. (Process_Args): Improve comments. (Search_Library_Path): Refactoring to avoid deep nesting. * inline.adb (Build_Body_To_Inline): Probably won't get around to doing that optimization. (Is_Unit_Subprogram): No, this should not be moved to Sem_Aux, because it is too specialized to this context. (Do_Reset): No comment is needed here; it's clear from the comment on Reset_Dispatching_Calls. Do_Reset is an artificial subprogram; if we had proper iterators, it would just be an if statement in the loop. (Rewrite_Function_Call): Probably won't get around to doing that optimization. * layout.adb (Layout_Type): The gigi comment doesn't need to be a ??? comment, and it's been that way since 2000. The limitation to scalars will likely never be investigated, and it's been that way since 2009. * lib.adb (Check_Same_Extended_Unit): This doesn't look like something that needs fixing; it looks like a permanent workaround. * lib-load.adb (Change_Main_Unit_To_Spec): It is good enough in practice. (Load_Unit): Nobody will ever get around to investigating the obscure PMES oddity, and the optimization is not worth the trouble. * live.adb: It's not worth documenting this. It is used only with a debug switch. Nobody who has done significant work on it is still around, so it would require substantial investigation. * mdll.ads: I see no reason for USE. * namet.ads: Routines are obsolete, but they're not going anywhere anytime soon (too much work, and surprisingly delicate because of dependences on global variables). * osint.ads: Minor. * osint.adb: Improve comments. (Full_Lib_File_Name): Use Smart_Find_File.
Diffstat (limited to 'gcc/ada/osint.adb')
-rw-r--r--gcc/ada/osint.adb18
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
index 4248e4b5..ea52a7a 100644
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.adb
@@ -49,10 +49,11 @@ package body Osint is
use type CRTL.size_t;
Running_Program : Program_Type := Unspecified;
- -- comment required here ???
+ -- Set by Set_Program to indicate which of Compiler, Binder, etc is
+ -- running.
Program_Set : Boolean := False;
- -- comment required here ???
+ -- True if Set_Program has been called; used to detect duplicate calls.
Std_Prefix : String_Ptr;
-- Standard prefix, computed dynamically the first time Relocate_Path
@@ -151,9 +152,9 @@ package body Osint is
function To_Path_String_Access
(Path_Addr : Address;
Path_Len : CRTL.size_t) return String_Access;
- -- Converts a C String to an Ada String. Are we doing this to avoid withing
- -- Interfaces.C.Strings ???
- -- Caller must free result.
+ -- Converts a C String to an Ada String. We don't use a more general
+ -- purpose facility, because we are dealing with low-level types like
+ -- Address. Caller must free result.
function Include_Dir_Default_Prefix return String_Access;
-- Same as exported version, except returns a String_Access
@@ -1348,11 +1349,8 @@ package body Osint is
Lib_File : out File_Name_Type;
Attr : out File_Attributes)
is
- A : aliased File_Attributes;
begin
- -- ??? seems we could use Smart_Find_File here
- Find_File (N, Library, Lib_File, A'Access);
- Attr := A;
+ Smart_Find_File (N, Library, Lib_File, Attr);
end Full_Lib_File_Name;
------------------------
@@ -1891,7 +1889,7 @@ package body Osint is
Name_Len := Full_Name'Length - 1;
Name_Buffer (1 .. Name_Len) :=
Full_Name (1 .. Full_Name'Last - 1);
- Found := Name_Find; -- ??? Was Name_Enter, no obvious reason
+ Found := Name_Find;
end if;
end if;
end;