From: Ronan Desplanques <desplanq...@adacore.com> The new version of the comment makes it clearer that Check_Nonoverridable_Aspects is only concerned with cases where a partial view is present.
This patch also fixes a reference to an ARM clause in the comment. gcc/ada/ChangeLog: * sem_ch3.adb (Check_Nonoverridable_Aspects): Improve documentation comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 04e3098bea7..8ac0fd3bc91 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3034,8 +3034,10 @@ package body Sem_Ch3 is or else In_Package_Body (Current_Scope)); procedure Check_Nonoverridable_Aspects; - -- Apply the rule in RM 13.1.1(18.4/4) on iterator aspects that cannot - -- be overridden, and can only be confirmed on derivation. + -- Apply rules for nonoverridable aspects on types with partial views + -- described in RM 13.1.1 (18.6/6). This procedure must only be called + -- in the partial view completion case, i.e. when T points to the + -- full view and Def_Id points to the partial view. procedure Check_Ops_From_Incomplete_Type; -- If there is a tagged incomplete partial view of the type, traverse -- 2.43.0