with System.WCh_Con;
package Ada.Text_IO with
- Abstract_State => (File_System),
- Initializes => (File_System),
+ SPARK_Mode,
+ Abstract_State => File_System,
+ Initializes => File_System,
Initial_Condition => Line_Length = 0 and Page_Length = 0
is
pragma Elaborate_Body;
Layout_Error : exception renames IO_Exceptions.Layout_Error;
private
+ pragma SPARK_Mode (Off);
-- The following procedures have a File_Type formal of mode IN OUT because
-- they may close the original file. The Close operation may raise an
procedure Do_Analyze is
Saved_GM : constant Ghost_Mode_Type := Ghost_Mode;
Saved_IGR : constant Node_Id := Ignored_Ghost_Region;
- -- Save the Ghost-related attributes to restore on exit
+ Saved_ISMP : constant Boolean :=
+ Ignore_SPARK_Mode_Pragmas_In_Instance;
+ -- Save Ghost and SPARK mode-related data to restore on exit
-- Generally style checks are preserved across compilations, with
-- one exception: s-oscons.ads, which allows arbitrary long lines
-- Set up a clean environment before analyzing
Install_Ghost_Region (None, Empty);
+ Ignore_SPARK_Mode_Pragmas_In_Instance := False;
Outer_Generic_Scope := Empty;
Scope_Suppress := Suppress_Options;
Pop_Scope;
Restore_Scope_Stack (List);
- Restore_Ghost_Region (Saved_GM, Saved_IGR);
Style_Max_Line_Length := Saved_ML;
Style_Check_Max_Line_Length := Saved_CML;
+
+ Restore_Ghost_Region (Saved_GM, Saved_IGR);
+ Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
end Do_Analyze;
-- Local variables