2019-12-13 Javier Miranda <miranda@adacore.com>
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specification): Processing a
precondition, if the expression is of the form A and then B, do
not generate separate Pre/Post aspects for the separate clases
when we are processing a generic unit. Required to avoid
reporting spurious visibility errors on the instantiations.
From-SVN: r279365
+2019-12-13 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch13.adb (Analyze_Aspect_Specification): Processing a
+ precondition, if the expression is of the form A and then B, do
+ not generate separate Pre/Post aspects for the separate clases
+ when we are processing a generic unit. Required to avoid
+ reporting spurious visibility errors on the instantiations.
+
2019-12-13 Eric Botcazou <ebotcazou@adacore.com>
* sem_res.adb (Resolve_Actuals): Give canonical error for
-- don't do this in GNATprove mode, because it brings no
-- benefit for proof and causes annoynace for flow analysis,
-- which prefers to be as close to the original source code
- -- as possible.
+ -- as possible. Also we don't do this when analyzing generic
+ -- units since it causes spurious visibility errors in the
+ -- preanalysis of instantiations.
if not (ASIS_Mode or GNATprove_Mode)
and then (Pname = Name_Postcondition
or else not Class_Present (Aspect))
+ and then not Inside_A_Generic
then
while Nkind (Expr) = N_And_Then loop
Insert_After (Aspect,