This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Follow-up fix for PR ada/30827
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Nov 2008 11:33:09 +0100
- Subject: Follow-up fix for PR ada/30827
There is a small inconsistency between GNAT.Compiler_Version:
Ver_Len_Max : constant := 32;
-- This is logically a reference to Gnatvsn.Ver_Len_Max but we cannot
-- import this directly since run-time units cannot WITH compiler units.
and Gnatvsn:
Ver_Len_Max : constant := 64;
-- Longest possible length for Gnat_Version_String in this or any
-- other version of GNAT. This is used by the binder to establish
-- space to store any possible version string value for checks. This
-- value should never be decreased in the future, but it would be
-- OK to increase it if absolutely necessary.
Fixed thus, tested on i586-suse-linux, applied on the mainline.
2008-11-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/30827
* g-comver.adb (Ver_Len_Max): Fix inconsistency.
2008-11-29 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/test_version.adb: Adjust to new string length.
--
Eric Botcazou
Index: ada/g-comver.adb
===================================================================
--- ada/g-comver.adb (revision 142273)
+++ ada/g-comver.adb (working copy)
@@ -37,7 +37,7 @@
package body GNAT.Compiler_Version is
- Ver_Len_Max : constant := 32;
+ Ver_Len_Max : constant := 64;
-- This is logically a reference to Gnatvsn.Ver_Len_Max but we cannot
-- import this directly since run-time units cannot WITH compiler units.
Index: testsuite/gnat.dg/test_version.adb
===================================================================
--- testsuite/gnat.dg/test_version.adb (revision 142273)
+++ testsuite/gnat.dg/test_version.adb (working copy)
@@ -5,8 +5,8 @@ procedure Test_Version is
use Vsn;
X : constant String := Version;
begin
- if X'Length = 46 then
- -- 46 = Ver_Len_Max + Ver_Prefix
+ if X'Length = 78 then
+ -- 78 = Ver_Len_Max + Ver_Prefix'Length
-- actual version should be shorter than this
raise Program_Error;
end if;