+2018-11-14 Justin Squirek <squirek@adacore.com>
+
+ * sem_ch7.adb (Uninstall_Declarations): Add conditional to avoid
+ uninstalling potential visibility during freezing on enumeration
+ literals.
+
2018-11-14 Jerome Lambourg <lambourg@adacore.com>
* env.c: Do not include crt_externs.h on iOS, as it does not
-- a) If the entity is an operator, it may be a primitive operator of
-- a type for which there is a visible use-type clause.
- -- b) for other entities, their use-visibility is determined by a
- -- visible use clause for the package itself. For a generic instance,
+ -- b) For other entities, their use-visibility is determined by a
+ -- visible use clause for the package itself or a use-all-type clause
+ -- applied directly to the entity's type. For a generic instance,
-- the instantiation of the formals appears in the visible part,
-- but the formals are private and remain so.
Set_Is_Potentially_Use_Visible (Id);
end if;
+ -- We need to avoid incorrectly marking enumeration literals
+ -- as non-visible when a visible use-all-type clause is in effect.
+
+ elsif Type_In_Use (Etype (Id))
+ and then Nkind (Current_Use_Clause (Etype (Id))) =
+ N_Use_Type_Clause
+ and then All_Present (Current_Use_Clause (Etype (Id)))
+ then
+ null;
+
else
Set_Is_Potentially_Use_Visible (Id, False);
end if;
+2018-11-14 Justin Squirek <squirek@adacore.com>
+
+ * gnat.dg/enum5.adb: New testcase.
+
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/bip_exception.adb, gnat.dg/bip_exception.ads,