diff options
author | Ronan Desplanques <desplanques@adacore.com> | 2025-07-16 15:27:03 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-07-25 10:09:36 +0200 |
commit | 54cc682bcc7ee16e0476e33bab0d3af0f41f63c2 (patch) | |
tree | fabb99b0ae8263de5cd318e3789342aca90aae58 /gcc | |
parent | a999dc31581f0b3239668726cc508a02ce1f2450 (diff) | |
download | gcc-54cc682bcc7ee16e0476e33bab0d3af0f41f63c2.zip gcc-54cc682bcc7ee16e0476e33bab0d3af0f41f63c2.tar.gz gcc-54cc682bcc7ee16e0476e33bab0d3af0f41f63c2.tar.bz2 |
ada: Update comments
A previous patch changed the mechanism of early usage detection for
discriminants but failed to update a couple of surrounding comments
accordingly. This patch fixes this omission.
gcc/ada/ChangeLog:
* sem_ch3.adb (Process_Discriminants): Update comments
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index d30c866..3726169 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -21295,8 +21295,8 @@ package body Sem_Ch3 is -- On entry, the current scope is the composite type. -- The discriminants are initially entered into the scope of the type - -- via Enter_Name with the default Ekind of E_Void to prevent premature - -- use, as explained at the end of this procedure. + -- via Enter_Name with Is_Not_Self_Hidden set to False to prevent + -- premature use, as explained at the end of this procedure. Discr := First (Discriminant_Specifications (N)); while Present (Discr) loop @@ -21569,12 +21569,12 @@ package body Sem_Ch3 is -- expressions of a discriminant part if the specification of the -- discriminant is itself given in the discriminant part. (RM 3.7.1) - -- To detect this, the discriminant names are entered initially with an - -- Ekind of E_Void (which is the default Ekind given by Enter_Name). Any - -- attempt to use a void entity (for example in an expression that is - -- type-checked) produces the error message: premature usage. Now after - -- completing the semantic analysis of the discriminant part, we can set - -- the Ekind of all the discriminants appropriately. + -- To detect this, the discriminant names are entered initially with + -- Is_Not_Self_Hidden set to False. Any attempt to use a self-hidden + -- entity (for example in an expression that is type-checked) produces + -- the error message: premature usage. Now after completing the semantic + -- analysis of the discriminant part, we can set Is_Not_Self_Hidden on + -- all the discriminants appropriately. Discr := First (Discriminant_Specifications (N)); Discr_Number := Uint_1; |