gnatvsn.ads (PCS_Version_Number, [...]): Removed.
authorThomas Quinot <quinot@adacore.com>
Wed, 26 Sep 2007 10:42:09 +0000 (12:42 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 26 Sep 2007 10:42:09 +0000 (12:42 +0200)
2007-09-26  Thomas Quinot  <quinot@adacore.com>
    Sergey Rybin  <rybin@adacore.com>

* 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

gcc/ada/exp_dist.ads
gcc/ada/gnatvsn.ads
gcc/ada/opt.ads
gcc/ada/rtsfind.adb
gcc/ada/sem_dist.ads
gcc/ada/tree_io.ads

index 75ac779704610e64f9f0c4cf1e0a2095affa060c..cada018330d18a0781c46b52e7035eee2a0e1a9e 100644 (file)
@@ -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
index 1b1398920baab51e92b24866543f57714a042ee5..b806f448eb9a47b2c4ee546787f6edc19864c6e5 100644 (file)
@@ -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
 
index 7a105569cd04738a9b85c815fd058249b94d9dd7..d766e97abbe955c1d5dac76a3e0e86cea816592e 100644 (file)
@@ -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
 
index a45a7e1d1a6316edb22bc7d3b797483a9f941923..0b17d957f814665390374c34f4edb6544fec2c3d 100644 (file)
@@ -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;
index 71474b66860d5be4f154e22c927c095680ab76c1..da64ef858efb7753a059210d933082d2738d74a1 100644 (file)
@@ -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);
index 64f883a619820ecedd43161f372a0194c7437196..a8a49e91aafc19aefd2d13a589d808d56234e490 100644 (file)
@@ -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