diff options
| author | Eric Botcazou <ebotcazou@adacore.com> | 2025-11-05 21:15:35 +0100 |
|---|---|---|
| committer | Eric Botcazou <ebotcazou@adacore.com> | 2025-11-05 21:20:46 +0100 |
| commit | 35e029530f256bb6302a3cae650d7eaef5514a36 (patch) | |
| tree | 11ed020e90061ed242c21fc09ff2de3fac36f9df /libgrust/rustc-lib/core/benches | |
| parent | 90f2ab4b6e1463d8cb89c70585e19987a58f3de1 (diff) | |
| download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 | |
The RM 3.8(12/3) subclause says that a discriminant mentioned in a
constraint must appear alone as a direct name. The last part is not
consistently checked and, while the first part is, it generates a
slightly different error message depending on the form of the input.
This fixes the last part and changes the first to use a single message.
gcc/ada/
PR ada/35793
* sem_res.adb (Check_Discriminant_Use): In a constraint context,
check that the discriminant appears alone as a direct name in all
cases and give a consistent error message when it does not.
gcc/testsuite/
* gnat.dg/specs/discr8.ads: New test.
Diffstat (limited to 'libgrust/rustc-lib/core/benches')
0 files changed, 0 insertions, 0 deletions
