[Ada] Rtsfind: improve comment on RTE_Available

2019-09-19  Bob Duff  <duff@adacore.com>

gcc/ada/

	* rtsfind.ads (RTE_Available): Improve comment.

From-SVN: r275930
This commit is contained in:
Bob Duff 2019-09-19 08:12:34 +00:00 committed by Pierre-Marie de Rodat
parent a7268fd765
commit f4437882fe
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2019-09-19 Bob Duff <duff@adacore.com>
* rtsfind.ads (RTE_Available): Improve comment.
2019-09-18 Bob Duff <duff@adacore.com>
* exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call

View File

@ -3203,6 +3203,23 @@ package Rtsfind is
-- Returns true if a call to RTE will succeed without raising an exception
-- and without generating an error message, i.e. if the call will obtain
-- the desired entity without any problems.
--
-- If we call this and it returns True, we should generate a call to E.
-- In other words, the compiler should not call RTE_Available (E) until
-- it has decided it wants to generate a call to E. Otherwise we can get
-- spurious dependencies and elaboration orders.
--
-- if RTE_Available (E) -- WRONG!
-- and then <some condition>
-- then
-- generate call to E;
--
-- Should be:
--
-- if <some condition>
-- and then RTE_Available (E) -- Correct
-- then
-- generate call to E;
function RTE_Record_Component (E : RE_Id) return Entity_Id;
-- Given the entity defined in the above tables, as identified by the