diff options
author | Steve Baird <baird@adacore.com> | 2021-02-17 17:54:53 -0800 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-15 06:19:13 -0400 |
commit | 4dbdeeb889dfd4dcce214e1525b56a7464128a3c (patch) | |
tree | de2ca5f18032895c533c551522139266ddd8571b /gcc/ada/sem_util.ads | |
parent | 44d27e8e735855216d21d6fca80473f56a69b698 (diff) | |
download | gcc-4dbdeeb889dfd4dcce214e1525b56a7464128a3c.zip gcc-4dbdeeb889dfd4dcce214e1525b56a7464128a3c.tar.gz gcc-4dbdeeb889dfd4dcce214e1525b56a7464128a3c.tar.bz2 |
[Ada] Avoid inappropriate error messages regarding aggregates and variant parts
gcc/ada/
* sem_util.adb (Gather_Components): Factor the test that was
already being used to govern emitting a pre-Ada_2020 error
message into an expression function,
OK_Scope_For_Discrim_Value_Error_Messages. Call that new
function in two places: the point where the same test was being
performed previously, and in governing emission of a newer
Ada_2020 error message. In both cases, the out-mode parameter
Gather_Components.Report_Errors is set to True even if no error
messages are generated within Gather_Components.
* sem_util.ads: Correct a comment.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 83791fc..2e26c28 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1079,7 +1079,8 @@ package Sem_Util is -- to its tail. -- -- Report_Errors is set to True if the values of the discriminants are - -- non-static. + -- insufficiently static (see body for details of what that means). + -- -- Allow_Compile_Time if set to True, allows compile time known values in -- Governed_By expressions in addition to static expressions. |