summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-writ.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-05 10:57:42 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-05 10:57:42 +0000
commit5dd93a611bb7f17691c3f1b16d5a116821cd0734 (patch)
treed9d0f449322c41f0b8dc1b336a7e557d2d66170d /gcc/ada/lib-writ.adb
parent6f88dcfb7df75dcf62a699d203dd898ce09bef04 (diff)
downloadgcc-5dd93a611bb7f17691c3f1b16d5a116821cd0734.tar.gz
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb: Add an entry for SPARK_Mode in table Canonical_Aspect. * aspects.ads: Add an entry for SPARK_Mode in tables Aspect_Id, Aspect_Argument, Aspect_Names. * atree.adb (Node32): New routine. (Set_Node32): New routine. * atree.ads (Node32): New routine. (Set_Node32): New routine. * einfo.adb: Node32 is now used as SPARK_Mode_Pragmas. (Set_SPARK_Mode_Pragmas): New routine. (SPARK_Mode_Pragmas): New routine. (Write_Field32_Name): Add and entry for SPARK_Modes. * einfo.ads: Add attribute SPARK_Mode_Pragmas along with usage in various entities. (Set_SPARK_Mode_Pragmas): New routine and pragma Inline. (SPARK_Mode_Pragmas): New routine and pragma Inline. * gnat_rm.texi: Add sections explaining the syntax and semantics of aspect/pragma SPARK_Mode. * gnat_ugn.texi: Add pragma SPARK_Mode to the list of configuration pragmas. * lib.adb (Set_SPARK_Mode_Pragma): New routine. (SPARK_Mode_Pragma): New routine. * lib.ads: Alphabetize the comments on fields of record Unit_Record. Add new field SPARK_Mode_Pragma along with comment on its usage. Update the layout of record Unit_Record. (Set_SPARK_Mode_Pragma): New routine and pragma Inline. (SPARK_Mode_Pragma): New routine and pragma Inline. * lib-load.adb (Create_Dummy_Package_Unit): Initialize field SPARK_Mode_Pragma. (Load_Main_Source): Initialize field SPARK_Mode_Pragma. (Load_Unit): Initialize field SPARK_Mode_Pragma. * lib-writ.adb (Add_Preprocessing_Dependency): Initialize field SPARK_Mode_Pragma. (Ensure_System_Dependency): Initialize field SPARK_Mode_Pragma. * opt.ads: Alphabetize verification flags. Store the compilation-wide SPARK mode in variable Global_SPARK_Mode. * par-prag.adb: Pragma SPARK_Mode does not need special processing by the parser. * sem_ch13.adb (Analyze_Aspect_Specifications): Convert aspect SPARK_Mode into a pragma. (Check_Aspect_At_Freeze_Point): Aspect SPARK_Mode does not need delayed processing. * sem_prag.adb: Add an entry for SPARK_Mode in table Sig_Flags. (Analyze_Pragma): Add processing for pragma SPARK_Mode. (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sem_prag.ads (Get_SPARK_Mode_Id): New routine. (Is_Elaboration_SPARK_Mode): New routine. (Is_Private_SPARK_Mode): New routine. * sinfo.ads: Update the comment on the usage of field Next_Pragma. * snames.ads-tmpl: Add new predefined name for SPARK_Mode and Auto. Add new pragma Id for SPARK_Mode. * types.ads: Add new type SPARK_Mode_Id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200711 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-writ.adb')
-rw-r--r--gcc/ada/lib-writ.adb90
1 files changed, 46 insertions, 44 deletions
diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index e786f473add..e5c0912ad96 100644
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -71,28 +71,29 @@ package body Lib.Writ is
begin
Units.Increment_Last;
Units.Table (Units.Last) :=
- (Unit_File_Name => File_Name (S),
- Unit_Name => No_Unit_Name,
- Expected_Unit => No_Unit_Name,
- Source_Index => S,
- Cunit => Empty,
- Cunit_Entity => Empty,
- Dependency_Num => 0,
- Dynamic_Elab => False,
- Fatal_Error => False,
- Generate_Code => False,
- Has_Allocator => False,
- Has_RACW => False,
- Is_Compiler_Unit => False,
- Ident_String => Empty,
- Loading => False,
- Main_Priority => -1,
- Main_CPU => -1,
- Munit_Index => 0,
- Serial_Number => 0,
- Version => 0,
- Error_Location => No_Location,
- OA_Setting => 'O');
+ (Unit_File_Name => File_Name (S),
+ Unit_Name => No_Unit_Name,
+ Expected_Unit => No_Unit_Name,
+ Source_Index => S,
+ Cunit => Empty,
+ Cunit_Entity => Empty,
+ Dependency_Num => 0,
+ Dynamic_Elab => False,
+ Fatal_Error => False,
+ Generate_Code => False,
+ Has_Allocator => False,
+ Has_RACW => False,
+ Is_Compiler_Unit => False,
+ Ident_String => Empty,
+ Loading => False,
+ Main_Priority => -1,
+ Main_CPU => -1,
+ Munit_Index => 0,
+ Serial_Number => 0,
+ Version => 0,
+ Error_Location => No_Location,
+ OA_Setting => 'O',
+ SPARK_Mode_Pragma => Empty);
end Add_Preprocessing_Dependency;
------------------------------
@@ -128,28 +129,29 @@ package body Lib.Writ is
Units.Increment_Last;
Units.Table (Units.Last) := (
- Unit_File_Name => System_Fname,
- Unit_Name => System_Uname,
- Expected_Unit => System_Uname,
- Source_Index => System_Source_File_Index,
- Cunit => Empty,
- Cunit_Entity => Empty,
- Dependency_Num => 0,
- Dynamic_Elab => False,
- Fatal_Error => False,
- Generate_Code => False,
- Has_Allocator => False,
- Has_RACW => False,
- Is_Compiler_Unit => False,
- Ident_String => Empty,
- Loading => False,
- Main_Priority => -1,
- Main_CPU => -1,
- Munit_Index => 0,
- Serial_Number => 0,
- Version => 0,
- Error_Location => No_Location,
- OA_Setting => 'O');
+ Unit_File_Name => System_Fname,
+ Unit_Name => System_Uname,
+ Expected_Unit => System_Uname,
+ Source_Index => System_Source_File_Index,
+ Cunit => Empty,
+ Cunit_Entity => Empty,
+ Dependency_Num => 0,
+ Dynamic_Elab => False,
+ Fatal_Error => False,
+ Generate_Code => False,
+ Has_Allocator => False,
+ Has_RACW => False,
+ Is_Compiler_Unit => False,
+ Ident_String => Empty,
+ Loading => False,
+ Main_Priority => -1,
+ Main_CPU => -1,
+ Munit_Index => 0,
+ Serial_Number => 0,
+ Version => 0,
+ Error_Location => No_Location,
+ OA_Setting => 'O',
+ SPARK_Mode_Pragma => Empty);
-- Parse system.ads so that the checksum is set right
-- Style checks are not applied.