diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-11-27 15:53:23 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-11-27 15:53:23 +0000 |
commit | 559d60552c6006428fcdedac16209731ad7c917e (patch) | |
tree | 5cb0698719ccee151d657bbd5d581dcc643423c4 /gcc/ada | |
parent | 3dbe9454540ab183476df93e6ef8eab50fbb13b5 (diff) | |
download | gcc-559d60552c6006428fcdedac16209731ad7c917e.zip gcc-559d60552c6006428fcdedac16209731ad7c917e.tar.gz gcc-559d60552c6006428fcdedac16209731ad7c917e.tar.bz2 |
bootstrap-lto.mk (BOOT_ADAFLAGS): Delete.
config/
* bootstrap-lto.mk (BOOT_ADAFLAGS): Delete.
gcc/
* tree-nested.c (remap_vla_decls): Fully expand value expressions of
VLA variables.
gcc/ada/
* gnatvsn.adb (Version_String): Change type to C-like array of chars.
(Gnat_Version_String): Adjust to above change.
From-SVN: r167201
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gnatvsn.adb | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b1a8da7c..24e3615 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2010-11-27 Eric Botcazou <ebotcazou@adacore.com> + + * gnatvsn.adb (Version_String): Change type to C-like array of chars. + (Gnat_Version_String): Adjust to above change. + 2010-11-18 Eric Botcazou <ebotcazou@adacore.com> * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Also diff --git a/gcc/ada/gnatvsn.adb b/gcc/ada/gnatvsn.adb index b0428a9..34f72e7 100644 --- a/gcc/ada/gnatvsn.adb +++ b/gcc/ada/gnatvsn.adb @@ -53,9 +53,10 @@ package body Gnatvsn is " FOR A PARTICULAR PURPOSE."; end Gnat_Free_Software; - Version_String : String (1 .. Ver_Len_Max); + type char_array is array (Natural range <>) of aliased Character; + Version_String : char_array (0 .. Ver_Len_Max - 1); -- Import the C string defined in the (language-independent) source file - -- version.c. + -- version.c using the zero-based convention of the C language. -- The size is not the real one, which does not matter since we will -- check for the nul character in Gnat_Version_String. pragma Import (C, Version_String, "version_string"); @@ -65,15 +66,17 @@ package body Gnatvsn is ------------------------- function Gnat_Version_String return String is - NUL_Pos : Positive := 1; + S : String (1 .. Ver_Len_Max); + Pos : Natural := 0; begin loop - exit when Version_String (NUL_Pos) = ASCII.NUL; + exit when Version_String (Pos) = ASCII.NUL; - NUL_Pos := NUL_Pos + 1; + S (Pos + 1) := Version_String (Pos); + Pos := Pos + 1; end loop; - return Version_String (1 .. NUL_Pos - 1); + return S (1 .. Pos); end Gnat_Version_String; end Gnatvsn; |