From b4f94ac15e97bee365a0c3bc33dcec98fb242c04 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Tue, 24 Sep 2002 03:44:36 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 63 +++++++++++++----------- gcc/ada/ChangeLog | 57 ++++++++++++--------- gcc/ada/Make-lang.in | 2 +- gcc/ada/Makefile.in | 4 +- gcc/ada/gnat1drv.adb | 3 +- gcc/ada/gnatcmd.adb | 1 - gcc/ada/gnatkr.adb | 2 - gcc/ada/gnatlbr.adb | 2 - gcc/ada/gnatlink.adb | 2 - gcc/ada/gnatls.adb | 1 - gcc/ada/gnatmake.adb | 3 -- gcc/ada/gnatprep.adb | 1 - gcc/ada/gnatpsta.adb | 2 - gcc/ada/gnatvsn.adb | 82 +++++++++++++++++++++++++++++++ gcc/ada/gnatvsn.ads | 12 ++--- gcc/f/ChangeLog | 13 ++++- gcc/f/Make-lang.in | 19 +++---- gcc/f/com.c | 2 +- gcc/f/g77spec.c | 5 +- gcc/f/parse.c | 2 +- gcc/f/version.c | 4 -- gcc/f/version.h | 6 --- gcc/version.c | 2 +- gcc/version.h | 2 +- libf2c/ChangeLog | 21 ++++++-- libf2c/libF77/Version.c | 18 ++++--- libf2c/libI77/Version.c | 18 +------ libf2c/libU77/Version.c | 13 +---- maintainer-scripts/ChangeLog | 5 ++ maintainer-scripts/gcc_release | 12 +---- maintainer-scripts/update_version | 28 ++++++----- 31 files changed, 236 insertions(+), 171 deletions(-) create mode 100644 gcc/ada/gnatvsn.adb delete mode 100644 gcc/f/version.c delete mode 100644 gcc/f/version.h diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48cd73e9f49..a1f4eff4e86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-23 Zack Weinberg + + * version.c (version_string): Now const char[]. + * version.h: Update to match. + 2002-09-23 Richard Henderson * config/i386/i386.h (MASK_ACCUMULATE_OUTGOING_ARGS_SET, MASK_MMX_SET, @@ -55,7 +60,7 @@ (c_common_decode_option): Process -fabi-version. * doc/invoke.texi (-fabi-version): Document it. (-Wabi): Add information about bit-fields in unions. - + 2002-09-22 Jason Thorpe * config/mips/netbsd.h (SUBTARGET_ASM_SPEC): Always pass -KPIC @@ -214,7 +219,7 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka (real_to_target_fmt, real_from_target_fmt): New. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, - ieee_quad_format, i370_single_format, i370_double_format, + ieee_quad_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Rename from s/_format//. (ieee_quad_format): Fix emin. (format_for_size, init_real_once): Remove. @@ -256,7 +261,7 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka for Intel 80-bit extended, if enabled. * config/m68k/m68k.c (override_options): Set real_format_for_mode - for Motorola 96-bit extended. + for Motorola 96-bit extended. * config/vax/vax.h (OVERRIDE_OPTIONS): New. * config/vax/vax.c (override_options): New. @@ -451,30 +456,30 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka 2002-09-19 Ulrich Weigand - * config/s390/s390.c (addr_generation_dependency_p): Handle SUBREG + * config/s390/s390.c (addr_generation_dependency_p): Handle SUBREG and STRICT_LOW_PART within SET_DEST. * config/s390/s390.md ("*extractqi", "*extracthi"): New insns with splitters, replacing pre-reload splitters. - ("*zero_extendhisi2_31", "*zero_extendqisi2_31", + ("*zero_extendhisi2_31", "*zero_extendqisi2_31", "*zero_extendqihi2_31"): New insns. ("*zero_extendqihi2_64"): Do not clobber CC. 2002-09-18 Devang Patel - * cp/cp-tree.h: New prototype for walk_vtabls(). - * cp/decl.c (walk_vtables_r): New function. - (struct cp_binding_level): Add new members, namespaces, - names_size and vtables. - (add_decl_to_level): Add decl in namespaces or vtables - chain, if conditions match. - (walk_vtables): New function. - (walk_namespaces_r): Travers separate namespace chain - for namespace decls. - (wrapup_globals_for_namespace): Use names_size instead - of list_length(). - * cp/decl2.c (finish_file): Use walk_vtables() instead of - walk_globals() to walk vtable decls. - + * cp/cp-tree.h: New prototype for walk_vtabls(). + * cp/decl.c (walk_vtables_r): New function. + (struct cp_binding_level): Add new members, namespaces, + names_size and vtables. + (add_decl_to_level): Add decl in namespaces or vtables + chain, if conditions match. + (walk_vtables): New function. + (walk_namespaces_r): Travers separate namespace chain + for namespace decls. + (wrapup_globals_for_namespace): Use names_size instead + of list_length(). + * cp/decl2.c (finish_file): Use walk_vtables() instead of + walk_globals() to walk vtable decls. + 2002-09-19 Steve Ellcey * config/ia64/hpux.h (CTORS_SECTION_ASM_OP): New. @@ -518,7 +523,7 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka 2002-09-18 Richard Henderson * ifcvt.c (noce_process_if_block): Correctly detect X modified - with INSN_B before COND_EARLIEST. Don't check A and B for + with INSN_B before COND_EARLIEST. Don't check A and B for modification in condition range. Reorder INSN_B for A==B properly. (if_convert): Iterate until no matches for a block. @@ -550,7 +555,7 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka 2002-09-18 Richard Henderson - * real.c (sticky_rshift_significand): Collect sticky as + * real.c (sticky_rshift_significand): Collect sticky as unsigned long, not bool. 2002-09-18 Ulrich Weigand @@ -650,7 +655,7 @@ Tue Aug 27 20:07:01 CEST 2002 Jan Hubicka 2002-09-17 Steve Ellcey - * config/ia64/elf.h: Remove CPP_PREDEFINES. + * config/ia64/elf.h: Remove CPP_PREDEFINES. Tue Sep 17 13:58:04 2002 Nicola Pero @@ -678,7 +683,7 @@ Tue Sep 17 13:40:13 2002 Nicola Pero * doc/objc.texi (Constant string objects): Extended documentation to make clear that the constant string class ivar layout is completely fixed. - + 2002-09-17 Roger Sayle * cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned @@ -692,7 +697,7 @@ Tue Sep 17 13:40:13 2002 Nicola Pero 2002-09-16 Richard Henderson PR fortran/3924 - * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. + * sdbout.c (sdbout_symbol): Don't handle offsets from a symbol. 2002-09-16 Richard Henderson @@ -701,10 +706,10 @@ Tue Sep 17 13:40:13 2002 Nicola Pero 2002-09-16 Jeff Garzik - * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. - * config/i386/i386.c (processor_alias_table): Add winchip-c6, + * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. + * config/i386/i386.c (processor_alias_table): Add winchip-c6, winchip2 and c3. - * doc/invoke.texi: Mention new aliases. + * doc/invoke.texi: Mention new aliases. 2002-09-16 John David Anglin @@ -931,7 +936,7 @@ Tue Sep 17 13:40:13 2002 Nicola Pero * config/s390/s390.c: Include "optabs.h". (s390_expand_movstr, s390_expand_clrstr, s390_expand_cmpstr): New. - config/s390/s390-protos.h (s390_expand_movstr, s390_expand_clrstr, + config/s390/s390-protos.h (s390_expand_movstr, s390_expand_clrstr, s390_expand_cmpstr): Add prototypes. config/s390/s390.md ("movstrdi", "movstrsi"): Call s390_expand_movstr. ("movstrdi_short"): Rename to "movstr_short_64". Change predicates @@ -1234,7 +1239,7 @@ Tue Sep 17 13:40:13 2002 Nicola Pero We need a temporary when passing, e.g. (long) x by const ref. * testsuite/g++.dg/other/constref[12].C: New, regression tests for passing a cast expression to a function by const reference. - + 2002-09-13 Richard Henderson * config/alpha/alpha.md (attr type): Add callpal. 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 + + * 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 * trans.c (tree_transform): Use real_ldexp not REAL_VALUE_LDEXP. @@ -265,7 +278,7 @@ 2002-04-21 Florian Weimer - * 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 @@ -433,7 +446,7 @@ 2002-03-23 Florian Weimer * gnat_rm.texi: Sync with ACT version. - (From Ben Brosgol ) + (From Ben Brosgol ) 2002-03-20 Neil Booth @@ -1741,7 +1754,7 @@ 2001-12-03 Robert Dewar * sinfo.ads: Minor reformatting. N_Freeze_Entity node does not - have Associated_Node. + have Associated_Node. 2001-12-03 Robert Dewar @@ -2114,7 +2127,7 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-26 Vincent Celier * 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 @@ -2123,7 +2136,7 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-25 Robert Dewar * 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 @@ -2133,22 +2146,22 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-25 Ed Schonberg * 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 * 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 * 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 * 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 @@ -2168,20 +2181,20 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-25 Ed Schonberg * 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 * 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 @@ -2200,10 +2213,10 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-25 Pascal Obry * 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 @@ -2216,25 +2229,25 @@ Thu Nov 15 18:16:17 2001 Richard Kenner 2001-10-25 Pascal Obry * 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 * 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 * 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: diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 7b70e60baa2..ef81853324f 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,14 @@ +2002-09-23 Zack Weinberg + + * 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. + 2002-09-23 Kazu Hirata * ChangeLog: Follow spelling conventions. @@ -38,7 +49,7 @@ * bugs.texi (Known Bugs): Refer to gcc.gnu.org instead of www.gnu.org for onlinedocs. * news.texi (News): Ditto. - + 2002-09-07 Jan Hubicka * com.c (ffe_type_for_mode): Handle long double. diff --git a/gcc/f/Make-lang.in b/gcc/f/Make-lang.in index 95ec02c5130..df31b1a6168 100644 --- a/gcc/f/Make-lang.in +++ b/gcc/f/Make-lang.in @@ -65,21 +65,17 @@ F77 f77: f771$(exeext) f77.extraclean f77.maintainer-clean f77.rebuilt \ f77.stage1 f77.stage2 f77.stage3 f77.stage4 -g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h $(SYSTEM_H) $(GCC_H) \ +g77spec.o: $(srcdir)/f/g77spec.c $(SYSTEM_H) $(GCC_H) \ $(CONFIG_H) (SHLIB_LINK='$(SHLIB_LINK)' \ SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \ $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ $(INCLUDES) $(srcdir)/f/g77spec.c) -g77version.o: $(srcdir)/f/version.c - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o g77version.o \ - $(srcdir)/f/version.c - # Create the compiler driver for g77. -g77$(exeext): gcc.o g77spec.o g77version.o version.o prefix.o intl.o \ +g77$(exeext): gcc.o g77spec.o version.o prefix.o intl.o \ $(LIBDEPS) $(EXTRA_GCC_OBJS) - $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o g77version.o \ + $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o g77spec.o \ version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS) # Create a version of the g77 driver which calls the cross-compiler. @@ -93,7 +89,7 @@ F77_OBJS = f/bad.o f/bit.o f/bld.o f/com.o f/data.o f/equiv.o f/expr.o \ f/global.o f/implic.o f/info.o f/intrin.o f/lab.o f/lex.o f/malloc.o \ f/name.o f/parse.o f/src.o f/st.o f/sta.o f/stb.o f/stc.o \ f/std.o f/ste.o f/storag.o f/stp.o f/str.o f/sts.o f/stt.o f/stu.o \ - f/stv.o f/stw.o f/symbol.o f/target.o f/top.o f/type.o f/version.o f/where.o + f/stv.o f/stw.o f/symbol.o f/target.o f/top.o f/type.o f/where.o # Use loose warnings for this front end. f-warn = @@ -321,7 +317,7 @@ f77.mostlyclean: -rm -f g77.aux g77.cps g77.ky g77.toc g77.vr g77.fn g77.kys \ g77.pg g77.tp g77.vrs g77.cp g77.fns g77.log g77.pgs g77.tps f77.clean: - -rm -f g77spec.o g77version.o + -rm -f g77spec.o f77.distclean: -rm -f f/Makefile f77.extraclean: @@ -332,7 +328,7 @@ f77.maintainer-clean: # The main makefile has already created stage?/f. G77STAGESTUFF = f/*$(objext) f/fini$(build_exeext) f/stamp-str \ - f/str-*.h f/str-*.j g77spec.o g77version.o + f/str-*.h f/str-*.j g77spec.o f77.stage1: stage1-start -mv -f $(G77STAGESTUFF) stage1/f @@ -425,7 +421,7 @@ f/parse.o: f/parse.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h \ f/where.h glimits.h f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def \ f/bit.h f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h \ f/bad.def f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h \ - f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h f/version.h flags.h + f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h version.h flags.h f/src.o: f/src.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/src.h f/bad.h f/bad.def \ f/where.h glimits.h f/top.h f/malloc.h f/st.o: f/st.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/st.h f/bad.h f/bad.def \ @@ -527,6 +523,5 @@ f/top.o: f/top.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/top.h f/malloc.h f/where.h \ f/intrin.def f/data.h f/expr.h f/implic.h f/src.h f/st.h flags.h \ toplev.h f/type.o: f/type.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/type.h f/malloc.h -f/version.o: f/version.c f/version.h f/where.o: f/where.c f/proj.h $(CONFIG_H) $(SYSTEM_H) f/where.h glimits.h f/top.h \ f/malloc.h f/lex.h $(GGC_H) gt-f-where.h diff --git a/gcc/f/com.c b/gcc/f/com.c index b14b875a24b..cc3af7ef481 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -11124,7 +11124,7 @@ ffecom_init_0 () name = bsearch ("foo", &names[0], ARRAY_SIZE (names), sizeof (names[0]), (int (*)(const void *, const void *)) strcmp); - if (name != &names[0][2]) + if (name != &names[2][0]) { assert ("bsearch doesn't work, #define FFEPROJ_BSEARCH 0 in proj.h" == NULL); diff --git a/gcc/f/g77spec.c b/gcc/f/g77spec.c index 2e094d911c7..6aea81b3c47 100644 --- a/gcc/f/g77spec.c +++ b/gcc/f/g77spec.c @@ -47,7 +47,6 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" #include "gcc.h" -#include #ifndef MATH_LIBRARY #define MATH_LIBRARY "-lm" @@ -374,7 +373,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) case OPTION_version: printf ("\ -GNU Fortran (GCC %s) %s\n\ +GNU Fortran (GCC) %s\n\ Copyright (C) 2002 Free Software Foundation, Inc.\n\ \n\ GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\ @@ -382,7 +381,7 @@ You may redistribute copies of GNU Fortran\n\ under the terms of the GNU General Public License.\n\ For more information about these matters, see the file named COPYING\n\ or type the command `info -f g77 Copying'.\n\ -", version_string, ffe_version_string); +", version_string); exit (0); break; diff --git a/gcc/f/parse.c b/gcc/f/parse.c index f687e592ec8..106ff3f60cc 100644 --- a/gcc/f/parse.c +++ b/gcc/f/parse.c @@ -35,7 +35,7 @@ ffe_parse_file (set_yydebug) ffewhereFile wf; if (ffe_is_version ()) - fprintf (stderr, "GNU Fortran Front End version %s\n", ffe_version_string); + fprintf (stderr, "GNU Fortran Front End version %s\n", version_string); if (!ffe_is_pedantic ()) ffe_set_is_pedantic (pedantic); diff --git a/gcc/f/version.c b/gcc/f/version.c deleted file mode 100644 index 8876e302c73..00000000000 --- a/gcc/f/version.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "ansidecl.h" -#include "f/version.h" - -const char *const ffe_version_string = "3.3 20020923 (experimental)"; diff --git a/gcc/f/version.h b/gcc/f/version.h deleted file mode 100644 index fe775519707..00000000000 --- a/gcc/f/version.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef GCC_F_VERSION_H -#define GCC_F_VERSION_H - -extern const char *const ffe_version_string; - -#endif /* ! GCC_F_VERSION_H */ diff --git a/gcc/version.c b/gcc/version.c index 7d76e23ca4a..a00497b1f3f 100644 --- a/gcc/version.c +++ b/gcc/version.c @@ -1,4 +1,4 @@ #include "ansidecl.h" #include "version.h" -const char *const version_string = "3.3 20020923 (experimental)"; +const char version_string[] = "3.3 20020923 (experimental)"; diff --git a/gcc/version.h b/gcc/version.h index 99416495a4f..db5972d2af8 100644 --- a/gcc/version.h +++ b/gcc/version.h @@ -1,4 +1,4 @@ #ifndef GCC_VERSION_H #define GCC_VERSION_H -extern const char *const version_string; +extern const char version_string[]; #endif /* ! GCC_VERSION_H */ diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog index 83aa4da652e..e06717f03bd 100644 --- a/libf2c/ChangeLog +++ b/libf2c/ChangeLog @@ -1,3 +1,14 @@ +2002-09-23 Zack Weinberg + + * 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). + Sun Sep 22 23:43:37 2002 Kaveh R. Ghazi * Makefile.in (all): Fix multilib parallel build. @@ -199,7 +210,7 @@ Mon May 20 13:03:54 2002 Kaveh R. Ghazi 2002-05-02 Alexandre Oliva - * Makefile.in: Fix for multilibbed natives. + * Makefile.in: Fix for multilibbed natives. 2002-04-15 Loren J. Rittle @@ -353,7 +364,7 @@ Mon May 20 13:03:54 2002 Kaveh R. Ghazi of shared libf2c to 0:0:0. 2001-09-29 Juergen Pfeifer - Toon Moene + Toon Moene Make libf2c a shared library. @@ -427,7 +438,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi * libI77/Makefile.in: Add necessary dependencies on config.h. 2001-07-06 Toon Moene - Pedro Vazquez + Pedro Vazquez * libI77/configure.in: Check for fseeko, ftello. * libI77/configure: Rebuilt. @@ -454,7 +465,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi * libI77/fio.h: Include for off_t. 2001-07-01 Toon Moene - Pedro Vazquez + Pedro Vazquez * libI77/fio.h: Use off_t when appropriate. * libI77/backspace.c (f_back): Ditto. @@ -612,7 +623,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi file atomically. 2000-07-03 Donn Terry (donnte@microsoft.com) - * libU77/aclocal.m4: check for 2 argument gettimeofday without + * libU77/aclocal.m4: check for 2 argument gettimeofday without struct timezone 2000-07-02 Toon Moene diff --git a/libf2c/libF77/Version.c b/libf2c/libF77/Version.c index 55b5faa996b..a27b0df7696 100644 --- a/libf2c/libF77/Version.c +++ b/libf2c/libF77/Version.c @@ -1,9 +1,6 @@ -static char junk[] = "\n@(#)LIBF77 VERSION 20000929\n"; - -/* -*/ - -char __G77_LIBF77_VERSION__[] = "3.3 20020923 (experimental)"; +const char __LIBF77_VERSION__[] = "@(#) LIBF77 VERSION 20000929\n"; +extern const char __LIBI77_VERSION__[]; +extern const char __LIBU77_VERSION__[]; /* 2.00 11 June 1980. File version.c added to library. @@ -87,6 +84,11 @@ char __G77_LIBF77_VERSION__[] = "3.3 20020923 (experimental)"; void g77__fvers__ () { - fprintf (stderr, "__G77_LIBF77_VERSION__: %s", __G77_LIBF77_VERSION__); - fputs (junk, stderr); + fputs ("GNU Fortran library.\n", stderr); +#if defined __GNUC__ && defined __VERSION__ + fprintf (stderr, "Compiled by GCC %s\n", __VERSION__); +#endif + fputs (__LIBF77_VERSION__, stderr); + fputs (__LIBI77_VERSION__, stderr); + fputs (__LIBU77_VERSION__, stderr); } diff --git a/libf2c/libI77/Version.c b/libf2c/libI77/Version.c index fe66153ce6d..f6b3d5d8a5e 100644 --- a/libf2c/libI77/Version.c +++ b/libf2c/libI77/Version.c @@ -1,9 +1,4 @@ -static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 20001205\n"; - -/* -*/ - -char __G77_LIBI77_VERSION__[] = "3.3 20020923 (experimental)"; +const char __LIBI77_VERSION__[] = "@(#) LIBI77 VERSION pjw,dmg-mods 20001205\n"; /* 2.01 $ format added @@ -324,17 +319,6 @@ wrtfmt.c: /* treat Tstuff= and Fstuff= as new assignments rather than as */ /* logical constants. */ - - /* Changes for GNU Fortran (g77) version of libf2c: */ /* 17 June 1997: detect recursive I/O and call f__fatal explaining it. */ - -#include - -void -g77__ivers__ () -{ - fprintf (stderr, "__G77_LIBI77_VERSION__: %s", __G77_LIBI77_VERSION__); - fputs (junk, stderr); -} diff --git a/libf2c/libU77/Version.c b/libf2c/libU77/Version.c index d245b6599b0..45b68a6b141 100644 --- a/libf2c/libU77/Version.c +++ b/libf2c/libU77/Version.c @@ -1,12 +1 @@ -static char junk[] = "\n@(#) LIBU77 VERSION 19980709\n"; - -char __G77_LIBU77_VERSION__[] = "3.3 20020923 (experimental)"; - -#include - -void -g77__uvers__ () -{ - fprintf (stderr, "__G77_LIBU77_VERSION__: %s", __G77_LIBU77_VERSION__); - fputs (junk, stderr); -} +const char __LIBU77_VERSION__[] = "@(#) LIBU77 VERSION 19980709\n"; diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index 9510f8e5af9..edba50ca0b3 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,8 @@ +2002-09-23 Zack Weinberg + + * update_version: Do not check in files which are unchanged. + * gcc_release: Only update the version in gcc/version.c. + 2002-09-17 Joseph S. Myers * update_web_docs (MANUALS): Add fastjar. diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release index 50e6803532b..45169e78f76 100755 --- a/maintainer-scripts/gcc_release +++ b/maintainer-scripts/gcc_release @@ -126,8 +126,7 @@ EOF error "Could not commit ${x}" done - # Update `gcc/version.c'. There are other version files - # as well, which should have release status updated. + # Update `gcc/version.c'. for x in gcc/version.c; do y=`basename ${x}` (changedir `dirname ${SOURCE_DIRECTORY}/${x}` && \ @@ -136,15 +135,6 @@ EOF ${CVS} ci -m 'Update version' ${y}) || \ error "Could not update ${x}" done - for x in gcc/ada/gnatvsn.ads gcc/f/version.c libf2c/libF77/Version.c \ - libf2c/libI77/Version.c libf2c/libU77/Version.c; do - y=`basename ${x}` - (changedir `dirname ${SOURCE_DIRECTORY}/${x}` && \ - sed -e 's/experimental\|prerelease/release/g' < ${y} > ${y}.new && \ - mv ${y}.new ${y} && \ - ${CVS} ci -m 'Update version' ${y}) || \ - error "Could not update ${x}" - done # Make sure we tag the sources for a final release. TAG="gcc_`echo ${RELEASE} | tr . _`_release" diff --git a/maintainer-scripts/update_version b/maintainer-scripts/update_version index bb94944710a..ff29928be2e 100755 --- a/maintainer-scripts/update_version +++ b/maintainer-scripts/update_version @@ -45,23 +45,29 @@ for BRANCH in $BRANCHES; do for file in $textstring_FILES; do if test -f $file; then - OLD_VERSION=`/bin/cat $file` - /bin/sed -e "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <$file.new -e \ + "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" - COMMIT_FILES="$COMMIT_FILES $file" + if /usr/bin/cmp -s $file $file.new; then + rm -f $file.new + else + mv -f $file.new $file + COMMIT_FILES="$COMMIT_FILES $file" + fi fi done for file in $cppdefine_FILES; do - if test -f $file; then - OLD_VERSION=`/bin/cat $file` - /bin/sed -e "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <$file.new -e \ + "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" - COMMIT_FILES="$COMMIT_FILES $file" + if /usr/bin/cmp -s $file $file.new; then + rm -f $file.new + else + mv -f $file.new $file + COMMIT_FILES="$COMMIT_FILES $file" + fi fi done