[Ada] Clean up ??? marks
authorBob Duff <duff@adacore.com>
Tue, 5 Jan 2021 19:16:00 +0000 (14:16 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 4 May 2021 09:17:32 +0000 (05:17 -0400)
commit0964be0713f6c9a9e6a2a0a3efe869b7570dc9ce
tree8228d4ef814957d9ba4ec518088a091d8bdf4629
parent86a9605014f424c556032c2c1586cbfbc4b72131
[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.
18 files changed:
gcc/ada/binde.adb
gcc/ada/bindo-writers.adb
gcc/ada/debug_a.adb
gcc/ada/errout.adb
gcc/ada/exp_ch4.adb
gcc/ada/gnatchop.adb
gcc/ada/gnatdll.adb
gcc/ada/gnatlink.adb
gcc/ada/inline.adb
gcc/ada/layout.adb
gcc/ada/lib-load.adb
gcc/ada/lib.adb
gcc/ada/live.adb
gcc/ada/mdll.ads
gcc/ada/namet.ads
gcc/ada/osint.adb
gcc/ada/osint.ads
gcc/ada/sinfo.ads