summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2002-09-24 03:44:36 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-09-24 03:44:36 +0000
commitb4f94ac15e97bee365a0c3bc33dcec98fb242c04 (patch)
tree3c1b3d7993c203fbf2075e0733e42db08d5c65e8 /gcc/ada
parent2e9ac4711ce15b88629a4c47373fb16f55e632fb (diff)
downloadgcc-b4f94ac15e97bee365a0c3bc33dcec98fb242c04.tar.gz
update_version: Do not check in files which are unchanged.
maintainer-scripts: * update_version: Do not check in files which are unchanged. * gcc_release: Only update the version in gcc/version.c. gcc: * version.c (version_string): Now const char[]. * version.h: Update to match. gcc/ada: * Make-lang.in (EXTRA_GNATBIND_OBJS): Add version.o. * Makefile.in (TOOLS_LIBS): Add ../../version.o. * gnatvsn.ads: Gnat_Version_String is now a function. * gnatvsn.adb: New file. When asked for Gnat_Version_String, copy the C version_string into a String and return it. * gnatcmd.adb, gnatkr.adb, gnatlbr.adb, gnatlink.adb, gnatls.adb,gnatmake.adb, gnatprep.adb, gnatpsta.adb: Remove pragma Ident (Gnat_Version_String). If this was the sole use of package Gnatvsn, remove the with statement too. * gnat1drv.adb: Tweak -gnatv output. gcc/f: * Make-lang.in (g77spec.o): Don't depend on f/version.h. (f/parse.o): Depend on version.h not f/version.h. (g77version.o, f/version.o): Delete all references. * com.c (ffecom_init_0): Fix transposed array indices in bsearch test. * g77spec.c: Don't include f/version.h or refer to ffe_version_string. * parse.c: Use version_string, not ffe_version_string. * version.c, version.h: Delete files. libf2c: * libF77/Version.c: Rename junk to __LIBF77_VERSION__. Add external decls for __LIBI77_VERSION__ and __LIBU77_VERSION__. Delete __G77_LIBF77_VERSION__ (g77__fvers__): Print all three __LIB*77_VERSION__ strings, and __VERSION__ if we have it; nothing else. * libI77/Version.c: Provide only __LIBI77_VERSION__ (formerly junk). * libU77/Version.c: Provide only __LIBU77_VERSION__ (formerly junk). From-SVN: r57461
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog57
-rw-r--r--gcc/ada/Make-lang.in2
-rw-r--r--gcc/ada/Makefile.in4
-rw-r--r--gcc/ada/gnat1drv.adb3
-rw-r--r--gcc/ada/gnatcmd.adb1
-rw-r--r--gcc/ada/gnatkr.adb2
-rw-r--r--gcc/ada/gnatlbr.adb2
-rw-r--r--gcc/ada/gnatlink.adb2
-rw-r--r--gcc/ada/gnatls.adb1
-rw-r--r--gcc/ada/gnatmake.adb3
-rw-r--r--gcc/ada/gnatprep.adb1
-rw-r--r--gcc/ada/gnatpsta.adb2
-rw-r--r--gcc/ada/gnatvsn.adb82
-rw-r--r--gcc/ada/gnatvsn.ads12
14 files changed, 126 insertions, 48 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2ba9289659d..64cb2ccfc10 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,16 @@
+2002-09-23 Zack Weinberg <zack@codesourcery.com>
+
+ * Make-lang.in (EXTRA_GNATBIND_OBJS): Add version.o.
+ * Makefile.in (TOOLS_LIBS): Add ../../version.o.
+ * gnatvsn.ads: Gnat_Version_String is now a function.
+ * gnatvsn.adb: New file. When asked for Gnat_Version_String,
+ copy the C version_string into a String and return it.
+ * gnatcmd.adb, gnatkr.adb, gnatlbr.adb, gnatlink.adb,
+ gnatls.adb,gnatmake.adb, gnatprep.adb, gnatpsta.adb:
+ Remove pragma Ident (Gnat_Version_String). If this was the
+ sole use of package Gnatvsn, remove the with statement too.
+ * gnat1drv.adb: Tweak -gnatv output.
+
2002-09-17 Richard Henderson <rth@redhat.com>
* trans.c (tree_transform): Use real_ldexp not REAL_VALUE_LDEXP.
@@ -265,7 +278,7 @@
2002-04-21 Florian Weimer <fw@deneb.enyo.de>
- * gnat_ug.texi: New file.
+ * gnat_ug.texi: New file.
* gnat_rm.texi: Do not include texiplus.texi. Include fdl.texi
instead of gfdl.texi
@@ -273,7 +286,7 @@
* xgnatug.adb, ug_words: New files.
* Makefile.in (doc, dvi): New targets. Build gnat_ug_*,
- gnat_rm and gnat-style manuals.
+ gnat_rm and gnat-style manuals.
2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
@@ -433,7 +446,7 @@
2002-03-23 Florian Weimer <fw@deneb.enyo.de>
* gnat_rm.texi: Sync with ACT version.
- (From Ben Brosgol <brosgol@gnat.com>)
+ (From Ben Brosgol <brosgol@gnat.com>)
2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
@@ -1741,7 +1754,7 @@
2001-12-03 Robert Dewar <dewar@gnat.com>
* sinfo.ads: Minor reformatting. N_Freeze_Entity node does not
- have Associated_Node.
+ have Associated_Node.
2001-12-03 Robert Dewar <dewar@gnat.com>
@@ -2114,7 +2127,7 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-26 Vincent Celier <celier@gnat.com>
* g-os_lib.adb (Normalize_Pathname): Preserve the double slash
- ("//") that precede the drive letter on Interix.
+ ("//") that precede the drive letter on Interix.
2001-10-26 Geert Bosch <bosch@gnat.com>
@@ -2123,7 +2136,7 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-25 Robert Dewar <dewar@gnat.com>
* sem_ch8.adb (Analyze_Package_Renaming): Skip analysis if Name
- is Error. Similar change for other renaming cases.
+ is Error. Similar change for other renaming cases.
2001-10-25 Robert Dewar <dewar@gnat.com>
@@ -2133,22 +2146,22 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-25 Ed Schonberg <schonber@gnat.com>
* par-ch3.adb (P_Subtype_Mark_Resync): for an anonymous array
- return Error rather than Empty so that analysis can proceed.
+ return Error rather than Empty so that analysis can proceed.
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_util.adb (Enter_Name): better handling of cascaded error
- messages when a unit appears in its own context.
+ messages when a unit appears in its own context.
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_util.adb (Defining_Entity): in case of error, attach created
- entity to specification, so that semantic analysis can proceed.
+ entity to specification, so that semantic analysis can proceed.
2001-10-25 Robert Dewar <dewar@gnat.com>
* sem_util.adb
- (Defining_Entity): Deal with Error.
+ (Defining_Entity): Deal with Error.
(Process_End_Label): Deal with bad end label for.
2001-10-25 Ed Schonberg <schonber@gnat.com>
@@ -2168,20 +2181,20 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_res.adb (Resolve_Call): if the call is actually an indexing
- operation on the result of a parameterless call, perform elaboration
- check after the node has been properly rewritten.
+ operation on the result of a parameterless call, perform elaboration
+ check after the node has been properly rewritten.
* sem_ch12.adb (Copy_Generic_Node): after the proper body has been
- inlined within the generic tree, the defining identifier is not a
- compilation_unit.
+ inlined within the generic tree, the defining identifier is not a
+ compilation_unit.
2001-10-25 Ed Schonberg <schonber@gnat.com>
* sem_res.adb (Resolve): special-case resolution of Null in an
- instance or an inlined body to avoid view conflicts.
+ instance or an inlined body to avoid view conflicts.
* sem_ch12.adb (Copy_Generic_Node): for allocators, check for view
- compatibility by retrieving the access type of the generic copy.
+ compatibility by retrieving the access type of the generic copy.
2001-10-25 Robert Dewar <dewar@gnat.com>
@@ -2200,10 +2213,10 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-25 Pascal Obry <obry@gnat.com>
* gnatmem.adb (Read_Next): fix Curs2 value to properly handle quiet
- mode case for ALLOC case.
+ mode case for ALLOC case.
* gnatmem.adb (Read_Next): correctly fix parsing in Quiet mode on
- all platforms. Improvement of last change.
+ all platforms. Improvement of last change.
2001-10-25 Robert Dewar <dewar@gnat.com>
@@ -2216,25 +2229,25 @@ Thu Nov 15 18:16:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2001-10-25 Pascal Obry <obry@gnat.com>
* osint.adb (Read_Default_Search_Dirs): correctly detect relative
- pathnames in UNIX and DOS style with drive letter.
+ pathnames in UNIX and DOS style with drive letter.
(Is_Relative): new routine.
* osint.adb: Minor reformatting
* osint.adb (Is_Relative): implementation using
- GNAT.OS_Lib.Is_Absolute_Path. Better fix.
+ GNAT.OS_Lib.Is_Absolute_Path. Better fix.
2001-10-25 Pascal Obry <obry@gnat.com>
* g-dirope.adb (Basename): correctly compute offset between the
- original Path and the translated one.
+ original Path and the translated one.
* g-dirope.adb: (Base_Name): add some comments.
2001-10-25 Robert Dewar <dewar@gnat.com>
* exp_imgv.adb (Expand_Image_Attribute): Defend against bad use
- in HIE mode, avoids compilation abandoned message
+ in HIE mode, avoids compilation abandoned message
* exp_imgv.adb: Correct typo in previous change
diff --git a/gcc/ada/Make-lang.in b/gcc/ada/Make-lang.in
index f84e02cc71e..8dd4c8fcd39 100644
--- a/gcc/ada/Make-lang.in
+++ b/gcc/ada/Make-lang.in
@@ -181,7 +181,7 @@ GNATBIND_OBJS = \
# List of extra object files linked in with various programs.
EXTRA_GNAT1_OBJS = prefix.o
-EXTRA_GNATBIND_OBJS = prefix.o
+EXTRA_GNATBIND_OBJS = prefix.o version.o
# FIXME: handle with configure substitutions
#ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(host))),)
diff --git a/gcc/ada/Makefile.in b/gcc/ada/Makefile.in
index 72a72dd8698..e4e6bb2e508 100644
--- a/gcc/ada/Makefile.in
+++ b/gcc/ada/Makefile.in
@@ -248,8 +248,8 @@ LIBIBERTY = ../../libiberty/libiberty.a
# and the system's installed libraries.
LIBS = $(INTLLIBS) $(LIBIBERTY) $(SYSLIBS)
LIBDEPS = $(INTLDEPS) $(LIBIBERTY)
-TOOLS_LIBS = ../../prefix.o $(LIBGNAT) ../../../libiberty/libiberty.a \
- $(SYSLIBS)
+TOOLS_LIBS = ../../prefix.o ../../version.o $(LIBGNAT) \
+ ../../../libiberty/libiberty.a $(SYSLIBS)
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 7acd9a77164..0c7a996b84a 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -130,7 +130,8 @@ begin
end if;
Write_Str (Gnat_Version_String);
- Write_Str (" Copyright 1992-2002 Free Software Foundation, Inc.");
+ Write_Eol;
+ Write_Str ("Copyright 1992-2002 Free Software Foundation, Inc.");
Write_Eol;
end if;
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 2a8372c8dc3..0048ed88e28 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -57,7 +57,6 @@ with GNAT.OS_Lib; use GNAT.OS_Lib;
with Table;
procedure GNATCmd is
- pragma Ident (Gnatvsn.Gnat_Version_String);
Ada_Include_Path : constant String := "ADA_INCLUDE_PATH";
Ada_Objects_Path : constant String := "ADA_OBJECTS_PATH";
diff --git a/gcc/ada/gnatkr.adb b/gcc/ada/gnatkr.adb
index 01ab98bd414..84f019bdd69 100644
--- a/gcc/ada/gnatkr.adb
+++ b/gcc/ada/gnatkr.adb
@@ -27,12 +27,10 @@
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Command_Line; use Ada.Command_Line;
-with Gnatvsn;
with Krunch;
with System.IO; use System.IO;
procedure Gnatkr is
- pragma Ident (Gnatvsn.Gnat_Version_String);
Count : Natural;
Maxlen : Integer;
diff --git a/gcc/ada/gnatlbr.adb b/gcc/ada/gnatlbr.adb
index 7bf0a806e76..75d1e37d0e0 100644
--- a/gcc/ada/gnatlbr.adb
+++ b/gcc/ada/gnatlbr.adb
@@ -45,14 +45,12 @@
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
-with Gnatvsn; use Gnatvsn;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with Osint; use Osint;
with Sdefault; use Sdefault;
with System;
procedure GnatLbr is
- pragma Ident (Gnat_Version_String);
type Lib_Mode is (None, Create, Set, Delete);
Next_Arg : Integer;
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb
index 87ba0598f1f..cb48bee383e 100644
--- a/gcc/ada/gnatlink.adb
+++ b/gcc/ada/gnatlink.adb
@@ -45,8 +45,6 @@ with Interfaces.C_Streams; use Interfaces.C_Streams;
procedure Gnatlink is
- pragma Ident (Gnat_Version_String);
-
package Gcc_Linker_Options is new Table.Table (
Table_Component_Type => String_Access,
Table_Index_Type => Integer,
diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
index ce6218ddb90..1208c1d1f8d 100644
--- a/gcc/ada/gnatls.adb
+++ b/gcc/ada/gnatls.adb
@@ -41,7 +41,6 @@ with Targparm; use Targparm;
with Types; use Types;
procedure Gnatls is
- pragma Ident (Gnat_Version_String);
Max_Column : constant := 80;
diff --git a/gcc/ada/gnatmake.adb b/gcc/ada/gnatmake.adb
index 1ce76674a27..1c481065cec 100644
--- a/gcc/ada/gnatmake.adb
+++ b/gcc/ada/gnatmake.adb
@@ -27,12 +27,9 @@
-- Gnatmake usage: please consult the gnat documentation
-with Gnatvsn;
with Make;
procedure Gnatmake is
- pragma Ident (Gnatvsn.Gnat_Version_String);
-
begin
-- The real work is done in Package Make. Gnatmake used to be a standalone
-- routine. Now Gnatmake's facilities have been placed in a package
diff --git a/gcc/ada/gnatprep.adb b/gcc/ada/gnatprep.adb
index 8fc5b33aabc..8c1bfced06d 100644
--- a/gcc/ada/gnatprep.adb
+++ b/gcc/ada/gnatprep.adb
@@ -36,7 +36,6 @@ with GNAT.Command_Line;
with Gnatvsn;
procedure GNATprep is
- pragma Ident (Gnatvsn.Gnat_Version_String);
type Strptr is access String;
diff --git a/gcc/ada/gnatpsta.adb b/gcc/ada/gnatpsta.adb
index 6a3d582e1c7..b525cb49c1e 100644
--- a/gcc/ada/gnatpsta.adb
+++ b/gcc/ada/gnatpsta.adb
@@ -34,13 +34,11 @@
-- integer and floating point sizes.
with Ada.Text_IO; use Ada.Text_IO;
-with Gnatvsn;
with Ttypef; use Ttypef;
with Ttypes; use Ttypes;
with Types; use Types;
procedure GnatPsta is
- pragma Ident (Gnatvsn.Gnat_Version_String);
procedure P (Item : String) renames Ada.Text_IO.Put_Line;
diff --git a/gcc/ada/gnatvsn.adb b/gcc/ada/gnatvsn.adb
new file mode 100644
index 00000000000..2555f7a570c
--- /dev/null
+++ b/gcc/ada/gnatvsn.adb
@@ -0,0 +1,82 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T V S N --
+-- --
+-- B o d y --
+-- --
+-- --
+-- Copyright (C) 2002 Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
+-- MA 02111-1307, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+
+package body Gnatvsn is
+
+ -- Import the string constant defined in the (language-independent)
+ -- source file version.c.
+
+ -- The size is a lie; we have no way of writing the truth (the size
+ -- is variable and depends on the actual text of the constant).
+
+ -- FIXME: It should be possible to declare this to be a constant, but
+ -- that is rejected by the compiler ("invalid context for deferred
+ -- constant declaration"). Per Ada95 this constraint only applies to
+ -- deferred constants completed by a full constant declaration, not
+ -- deferred constants completed by a pragma Import.
+
+ Version_String : array (0 .. Ver_Len_Max) of aliased Character;
+ pragma Import (C, Version_String, "version_string");
+
+ -- Convert that string constant to an Ada String and return it.
+ -- This is essentially the same as the To_Ada routine in
+ -- Interfaces.C; that package is not linked into gnat1 so
+ -- we cannot use it.
+
+ function Gnat_Version_String return String
+ is
+ Count : Natural := 0;
+
+ begin
+ loop
+ if Version_String (Count) = Character'First then
+ exit;
+ else
+ Count := Count + 1;
+ end if;
+ end loop;
+
+ declare
+ R : String (1 .. Count);
+
+ begin
+ for J in R'Range loop
+ R (J) := Version_String (J - 1);
+ end loop;
+
+ return R;
+ end;
+ end Gnat_Version_String;
+
+end Gnatvsn;
diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads
index f8ab78c6a79..90e41a78343 100644
--- a/gcc/ada/gnatvsn.ads
+++ b/gcc/ada/gnatvsn.ads
@@ -32,20 +32,16 @@
-- --
------------------------------------------------------------------------------
--- This package spec holds version information for GNAT, GNATBIND and
--- GNATMAKE. It is updated whenever the release number is changed.
+-- This package spec exports version information for GNAT, GNATBIND and
+-- GNATMAKE.
package Gnatvsn is
- Gnat_Version_String : constant String := "3.3 20020923 (experimental)";
+ function Gnat_Version_String
+ return String;
-- Version output when GNAT (compiler), or its related tools, including
-- GNATBIND, GNATCHOP, GNATFIND, GNATLINK, GNATMAKE, GNATXREF, are run
-- (with appropriate verbose option switch set).
- --
- -- WARNING: some scripts rely on the format of this string. Any change
- -- must be coordinated with a script maintainer. Furthermore, no
- -- other variable in this package may have a name starting with
- -- Gnat_Version_String.
Gnat_Version_Type : constant String := "FSF ";
-- This string is set to one of three values: