- -----------------------------------------
- -- Validate_Compile_Time_Warning_Error --
- -----------------------------------------
-
- procedure Validate_Compile_Time_Warning_Error (N : Node_Id) is
- begin
- Compile_Time_Warnings_Errors.Append
- (New_Val => CTWE_Entry'(Eloc => Sloc (N),
- Scope => Current_Scope,
- Prag => N));
- end Validate_Compile_Time_Warning_Error;
-
- ------------------------------------------
- -- Validate_Compile_Time_Warning_Errors --
- ------------------------------------------
-
- procedure Validate_Compile_Time_Warning_Errors is
- procedure Set_Scope (S : Entity_Id);
- -- Install all enclosing scopes of S along with S itself
-
- procedure Unset_Scope (S : Entity_Id);
- -- Uninstall all enclosing scopes of S along with S itself
-
- ---------------
- -- Set_Scope --
- ---------------
-
- procedure Set_Scope (S : Entity_Id) is
- begin
- if S /= Standard_Standard then
- Set_Scope (Scope (S));
- end if;
-
- Push_Scope (S);
- end Set_Scope;
-
- -----------------
- -- Unset_Scope --
- -----------------
-
- procedure Unset_Scope (S : Entity_Id) is
- begin
- if S /= Standard_Standard then
- Unset_Scope (Scope (S));
- end if;
-
- Pop_Scope;
- end Unset_Scope;
-
- -- Start of processing for Validate_Compile_Time_Warning_Errors
-
- begin
- Expander_Mode_Save_And_Set (False);
- In_Compile_Time_Warning_Or_Error := True;
-
- for N in Compile_Time_Warnings_Errors.First ..
- Compile_Time_Warnings_Errors.Last
- loop
- declare
- T : CTWE_Entry renames Compile_Time_Warnings_Errors.Table (N);
-
- begin
- Set_Scope (T.Scope);
- Reset_Analyzed_Flags (T.Prag);
- Process_Compile_Time_Warning_Or_Error (T.Prag, T.Eloc);
- Unset_Scope (T.Scope);
- end;
- end loop;
-
- In_Compile_Time_Warning_Or_Error := False;
- Expander_Mode_Restore;
- end Validate_Compile_Time_Warning_Errors;
-