]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Avoid inappropriate error messages regarding aggregates and variant parts
authorSteve Baird <baird@adacore.com>
Thu, 18 Feb 2021 01:54:53 +0000 (17:54 -0800)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 15 Jun 2021 10:19:13 +0000 (06:19 -0400)
commit4dbdeeb889dfd4dcce214e1525b56a7464128a3c
treede2ca5f18032895c533c551522139266ddd8571b
parent44d27e8e735855216d21d6fca80473f56a69b698
[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.
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads