Commit f4437882 by Bob Duff Committed by Pierre-Marie de Rodat

[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
parent a7268fd7
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment