+ procedure Make_Parents_Visible_And_Process_Pragmas (Par : Entity_Id) is
+ begin
+ -- When we reached the Standard scope, then just process pragmas
+
+ if Par = Standard_Standard then
+ Process_Categorization_Pragmas;
+
+ -- Otherwise make the current scope momentarily visible, recurse
+ -- into its enclosing scope, and restore the visibility. This is
+ -- required for child units that are instances of generic parents.
+
+ else
+ declare
+ Save_Is_Immediately_Visible : constant Boolean :=
+ Is_Immediately_Visible (Par);
+ begin
+ Set_Is_Immediately_Visible (Par);
+ Make_Parents_Visible_And_Process_Pragmas (Scope (Par));
+ Set_Is_Immediately_Visible (Par, Save_Is_Immediately_Visible);
+ end;