From: Thomas Quinot Date: Wed, 26 Sep 2007 10:42:09 +0000 (+0200) Subject: gnatvsn.ads (PCS_Version_Number, [...]): Removed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e29bd38f96e9c8a9bd6ba0d12a73dee3794f4895;p=gcc.git gnatvsn.ads (PCS_Version_Number, [...]): Removed. 2007-09-26 Thomas Quinot Sergey Rybin * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed. * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist, where it belongs. * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO. * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist, where it belongs. * sem_dist.ads: Minor comment fix * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO. From-SVN: r128783 --- diff --git a/gcc/ada/exp_dist.ads b/gcc/ada/exp_dist.ads index 75ac7797046..cada018330d 100644 --- a/gcc/ada/exp_dist.ads +++ b/gcc/ada/exp_dist.ads @@ -31,6 +31,13 @@ with Types; use Types; package Exp_Dist is + PCS_Version_Number : constant := 1; + -- PCS interface version. This is used to check for consistency between the + -- compiler used to generate distribution stubs and the PCS implementation. + -- It must be incremented whenever a change is made to the generated code + -- for distribution stubs that would result in the compiler being + -- incompatible with an older version of the PCS, or vice versa. + procedure Add_RAST_Features (Vis_Decl : Node_Id); -- Build and add bodies for dereference and 'Access subprograms for a -- remote access to subprogram type. Vis_Decl is the declaration node for diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads index 1b1398920ba..b806f448eb9 100644 --- a/gcc/ada/gnatvsn.ads +++ b/gcc/ada/gnatvsn.ads @@ -90,20 +90,6 @@ package Gnatvsn is Verbose_Library_Version : constant String := "GNAT Lib v" & Library_Version; -- Version string stored in e.g. ALI files. - ASIS_Version_Number : constant := 6; - -- ASIS Version. This is used to check for consistency between the compiler - -- used to generate trees, and an ASIS application that is reading the - -- trees. It must be updated (incremented) whenever a change is made to - -- the tree format that would result in a compiler being incompatible with - -- an older version of ASIS, or vice versa. - - PCS_Version_Number : constant := 1; - -- PCS interface version. This is used to check for consistency between the - -- compiler used to generate distribution stubs and the PCS implementation. - -- It must be incremented whenever a change is made to the generated code - -- for distribution stubs that would result in the compiler being - -- incompatible with an older version of the PCS, or vice versa. - Current_Year : constant String := "2007"; -- Used in printing copyright messages diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 7a105569cd0..d766e97abbe 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1451,7 +1451,8 @@ package Opt is -- They are set by Tree_Read procedure, so they represent the version -- number (and the version string) of the compiler which has created the -- tree, and they are supposed to be compared with the corresponding values - -- from the Gnatvsn package which is a part of ASIS implementation. + -- from the Tree_IO and Gnatvsn packages which also are a part of ASIS + -- implementation. Tree_Version_String : String_Access; -- Used to store the compiler version string read from a tree file to check @@ -1464,7 +1465,7 @@ package Opt is Tree_ASIS_Version_Number : Int; -- Used to store the ASIS version number read from a tree file to check if - -- it is the same as stored in the ASIS version number in Gnatvsn. + -- it is the same as stored in the ASIS version number in Tree_IO. private diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb index a45a7e1d1a6..0b17d957f81 100644 --- a/gcc/ada/rtsfind.adb +++ b/gcc/ada/rtsfind.adb @@ -30,9 +30,9 @@ with Debug; use Debug; with Einfo; use Einfo; with Elists; use Elists; with Errout; use Errout; +with Exp_Dist; use Exp_Dist; with Fname; use Fname; with Fname.UF; use Fname.UF; -with Gnatvsn; use Gnatvsn; with Lib; use Lib; with Lib.Load; use Lib.Load; with Namet; use Namet; @@ -921,7 +921,7 @@ package body Rtsfind is if Get_PCS_Name = Name_No_DSA then Check_RPC_Failure ("distribution feature not supported"); - elsif Get_PCS_Version /= Gnatvsn.PCS_Version_Number then + elsif Get_PCS_Version /= Exp_Dist.PCS_Version_Number then Check_RPC_Failure ("PCS version mismatch"); end if; diff --git a/gcc/ada/sem_dist.ads b/gcc/ada/sem_dist.ads index 71474b66860..da64ef858ef 100644 --- a/gcc/ada/sem_dist.ads +++ b/gcc/ada/sem_dist.ads @@ -37,7 +37,7 @@ package Sem_Dist is function Get_PCS_Version return Int; -- Return the version number of the PCS API implemented by the PCS. -- The consistency of this version with the one expected by Exp_Dist - -- (Gnatvsn.PCS_Version_Number) in Rtsfind.Check_RPC. + -- (Exp_Dist.PCS_Version_Number) in Rtsfind.RTE.Check_RPC. -- If no PCS version information is available, 0 is returned. procedure Add_Stub_Constructs (N : Node_Id); diff --git a/gcc/ada/tree_io.ads b/gcc/ada/tree_io.ads index 64f883a6198..a8a49e91aaf 100644 --- a/gcc/ada/tree_io.ads +++ b/gcc/ada/tree_io.ads @@ -46,6 +46,13 @@ package Tree_IO is Tree_Format_Error : exception; -- Raised if a format error is detected in the input file + ASIS_Version_Number : constant := 21; + -- ASIS Version. This is used to check for consistency between the compiler + -- used to generate trees and an ASIS application that is reading the + -- trees. It must be incremented whenever a change is made to the tree + -- format that would result in the compiler being incompatible with an + -- older version of ASIS, or vice versa. + procedure Tree_Read_Initialize (Desc : File_Descriptor); -- Called to initialize reading of a tree file. This call must be made -- before calls to Tree_Read_xx. No calls to Tree_Write_xx are permitted