ada: Tweak error messages on misplaced with keywords
authorRonan Desplanques <desplanques@adacore.com>
Wed, 9 Nov 2022 12:32:05 +0000 (13:32 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 21 Nov 2022 10:10:31 +0000 (11:10 +0100)
commit8bebbf7b463693316a1518ba31c04648cb629b23
tree29016d8872d939b61e42526103afac78a92a3eff
parentec8ec09f9414be871e322fecf4ebf53e3687bd22
ada: Tweak error messages on misplaced with keywords

Before this patch, with clauses placed in declarative sections were
interpreted by the compiler as incorrect aspect specifications, which
led to confusing error messages.

This patch makes it so more syntax errors involving the with keyword
are diagnosed as intended with clauses instead of aspect
specifications.

gcc/ada/

* par-ch3.adb (P_Declarative_Item): Tweak handling of with keyword.
gcc/ada/par-ch3.adb