This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Kill gcc/f, kneecap libf2c


No one being interested in maintaining G77, there is no point keeping
it around in CVS to confuse people, so this patch removes it and the
weird little snag it had introduced into the C front end.  There may
be other bits of code which are now obsolete; I didn't look very hard.

No one is much interested in libf2c either but Steven Bosscher opined
that bits of its code might be useful in the future as a compatibility
layer for libgfortran, so I am not deleting it just yet.  But I have
thoroughly disabled it, by removing all mention of it from the top
level Makefile and configure, and removing all of its generated
configure scripts.

Bootstrapped i686-linux, all languages, just to be sure.

The g77.* and gfortran.* testsuite directories ought to be smushed
together (and made to use dg.exp instead of torture.exp while we're at
it), but I have not done that because it would be more Tcl hacking
than I have time or stomach for right now.

It seemed appropriate to regenerate gcc.pot, and I fixed the bogus
entries for fortran/io.h while I was at it.

zw

top:
        * Makefile.def, Makefile.tpl, configure.in: Remove all mention
        of libf2c.
        * configure, Makefile.in: Regenerate.
contrib:
        * gcc_update: Remove gcc/f/intdoc.texi and all libf2c files
        from list of files to be touched.
        * convert_to_f2c, convert_to_g2c, download_f2c: Delete.
gcc:
        * f: Entire directory removed

        * c-common.h (CTI_G77_INTEGER_TYPE, CTI_G77_UINTEGER_TYPE)
        (CTI_G77_LONGINT_TYPE, CTI_G77_ULONGINT_TYPE)
        (g77_integer_type_node, g77_uinteger_type_node)
        (g77_longint_type_node, or g77_ulongint_type_node): Delete.
        * c-common.c (c_common_nodes_and_builtins): Do not initialize
        the above set of variables.

        * config/i386/uwin.h: No need to define WIN32_UWIN_TARGET.
        * doc/invoke.texi, doc/standards.texi: Remove cross-references
        to g77 manual.
gcc/po:
        * exgettext (spec_error_string): Do not scan beyond the end of
        the string for a close brace.  Do not bail out at the first
        incidence of %%e.
        * gcc.pot: Regenerate.

===================================================================
Index: Makefile.def
--- Makefile.def	13 May 2004 06:39:06 -0000	1.21
+++ Makefile.def	18 May 2004 01:09:03 -0000
@@ -101,7 +101,6 @@ host_modules= { module= utils; no_check=
 target_modules = { module= libstdc++-v3; raw_cxx=true; };
 target_modules = { module= libmudflap; };
 target_modules = { module= newlib; };
-target_modules = { module= libf2c; };
 target_modules = { module= libgfortran; };
 target_modules = { module= libobjc; };
 target_modules = { module= libtermcap; no_check=true; stage=true;
===================================================================
Index: Makefile.tpl
--- Makefile.tpl	13 May 2004 06:39:06 -0000	1.95
+++ Makefile.tpl	18 May 2004 01:09:03 -0000
@@ -1686,8 +1686,6 @@ configure-target-boehm-gc: $(ALL_GCC_C) 
 configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
 configure-target-libada: $(ALL_GCC_C)
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
 configure-target-libgfortran: $(ALL_GCC_C)
 configure-target-libffi: $(ALL_GCC_C) 
 configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
===================================================================
Index: configure.in
--- configure.in	13 May 2004 06:39:07 -0000	1.286
+++ configure.in	18 May 2004 01:09:03 -0000
@@ -150,7 +150,6 @@ target_libraries="target-libiberty \
 		target-newlib \
 		target-libstdc++-v3 \
 		target-libmudflap \
-		target-libf2c \
 		target-libgfortran \
 		${libgcj} \
 		target-libobjc \
@@ -390,7 +389,7 @@ case "${target}" in
     ;;
   *-*-kaos*)
     # Remove unsupported stuff on all kaOS configurations.
-    skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
+    skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
     skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
     skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
     noconfigdirs="$noconfigdirs target-libgloss"
@@ -413,12 +412,6 @@ case "${target}" in
     ;;
   *-*-rtems*)
     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
-    case ${target} in
-	h8300*-*-* | h8500-*-*)
-	  noconfigdirs="$noconfigdirs target-libf2c"
-          ;;
-        *) ;;
-    esac
     ;;
   *-*-uclinux*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
@@ -519,10 +512,10 @@ case "${target}" in
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   h8300*-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
+    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     ;;
   h8500-*-*)
-    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
+    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     ;;
   hppa*64*-*-linux* | parisc*64*-*-linux*)
     # In this case, it's because the hppa64-linux target is for
===================================================================
Index: contrib/gcc_update
--- contrib/gcc_update	13 May 2004 06:39:08 -0000	1.63
+++ contrib/gcc_update	18 May 2004 01:09:03 -0000
@@ -66,20 +66,12 @@ gcc/cstamp-h.in: gcc/configure.ac
 gcc/config.in: gcc/cstamp-h.in
 gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
 # And then, language-specific files
-gcc/f/intdoc.texi: gcc/f/intdoc.in gcc/f/intdoc.c gcc/f/intrin.h gcc/f/intrin.def
 gcc/cp/cfns.h: gcc/cp/cfns.gperf
 gcc/java/keyword.h: gcc/java/keyword.gperf
 # testsuite
 # Without this, _Pragma3.c can have a false negative.
 gcc/testsuite/gcc.dg/cpp/_Pragma3.c: gcc/testsuite/gcc.dg/cpp/mi1c.h
 # And libraries, at last
-libf2c/configure: libf2c/configure.in
-libf2c/libF77/configure: libf2c/libF77/configure.in
-libf2c/libI77/configure: libf2c/libI77/configure.in
-libf2c/libI77/stamp-h.in: libf2c/libI77/configure.in
-libf2c/libI77/config.h.in: libf2c/libI77/configure.in libf2c/libI77/stamp-h.in
-libf2c/libU77/configure: libf2c/libU77/configure.in
-libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h
 libbanshee/configure: libbanshee/configure.in
 libmudflap/configure: libmudflap/configure.in
 libobjc/configure: libobjc/configure.ac
===================================================================
Index: gcc/c-common.c
--- gcc/c-common.c	14 May 2004 02:32:54 -0000	1.499
+++ gcc/c-common.c	18 May 2004 01:09:03 -0000
@@ -3253,59 +3253,6 @@ c_common_nodes_and_builtins (void)
     (build_decl (TYPE_DECL, get_identifier ("complex long double"),
 		 complex_long_double_type_node));
 
-  /* Types which are common to the fortran compiler and libf2c.  When
-     changing these, you also need to be concerned with f/com.h.  */
-
-  if (TYPE_PRECISION (float_type_node)
-      == TYPE_PRECISION (long_integer_type_node))
-    {
-      g77_integer_type_node = long_integer_type_node;
-      g77_uinteger_type_node = long_unsigned_type_node;
-    }
-  else if (TYPE_PRECISION (float_type_node)
-	   == TYPE_PRECISION (integer_type_node))
-    {
-      g77_integer_type_node = integer_type_node;
-      g77_uinteger_type_node = unsigned_type_node;
-    }
-  else
-    g77_integer_type_node = g77_uinteger_type_node = NULL_TREE;
-
-  if (g77_integer_type_node != NULL_TREE)
-    {
-      lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
-					     get_identifier ("__g77_integer"),
-					     g77_integer_type_node));
-      lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
-					     get_identifier ("__g77_uinteger"),
-					     g77_uinteger_type_node));
-    }
-
-  if (TYPE_PRECISION (float_type_node) * 2
-      == TYPE_PRECISION (long_integer_type_node))
-    {
-      g77_longint_type_node = long_integer_type_node;
-      g77_ulongint_type_node = long_unsigned_type_node;
-    }
-  else if (TYPE_PRECISION (float_type_node) * 2
-	   == TYPE_PRECISION (long_long_integer_type_node))
-    {
-      g77_longint_type_node = long_long_integer_type_node;
-      g77_ulongint_type_node = long_long_unsigned_type_node;
-    }
-  else
-    g77_longint_type_node = g77_ulongint_type_node = NULL_TREE;
-
-  if (g77_longint_type_node != NULL_TREE)
-    {
-      lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
-					     get_identifier ("__g77_longint"),
-					     g77_longint_type_node));
-      lang_hooks.decls.pushdecl (build_decl (TYPE_DECL,
-					     get_identifier ("__g77_ulongint"),
-					     g77_ulongint_type_node));
-    }
-
   record_builtin_type (RID_VOID, NULL, void_type_node);
 
   void_zero_node = build_int_2 (0, 0);
===================================================================
Index: gcc/c-common.h
--- gcc/c-common.h	13 May 2004 06:39:28 -0000	1.226
+++ gcc/c-common.h	18 May 2004 01:09:03 -0000
@@ -156,11 +156,6 @@ enum c_tree_index
 
     CTI_DEFAULT_FUNCTION_TYPE,
 
-    CTI_G77_INTEGER_TYPE,
-    CTI_G77_UINTEGER_TYPE,
-    CTI_G77_LONGINT_TYPE,
-    CTI_G77_ULONGINT_TYPE,
-
     /* These are not types, but we have to look them up all the time.  */
     CTI_FUNCTION_NAME_DECL,
     CTI_PRETTY_FUNCTION_NAME_DECL,
@@ -204,12 +199,6 @@ struct c_common_identifier GTY(())
 #define const_string_type_node		c_global_trees[CTI_CONST_STRING_TYPE]
 
 #define default_function_type		c_global_trees[CTI_DEFAULT_FUNCTION_TYPE]
-
-/* g77 integer types, which must be kept in sync with f/com.h */
-#define g77_integer_type_node		c_global_trees[CTI_G77_INTEGER_TYPE]
-#define g77_uinteger_type_node		c_global_trees[CTI_G77_UINTEGER_TYPE]
-#define g77_longint_type_node		c_global_trees[CTI_G77_LONGINT_TYPE]
-#define g77_ulongint_type_node		c_global_trees[CTI_G77_ULONGINT_TYPE]
 
 #define function_name_decl_node		c_global_trees[CTI_FUNCTION_NAME_DECL]
 #define pretty_function_name_decl_node	c_global_trees[CTI_PRETTY_FUNCTION_NAME_DECL]
===================================================================
Index: gcc/config/i386/uwin.h
--- gcc/config/i386/uwin.h	26 Sep 2003 04:07:46 -0000	1.14
+++ gcc/config/i386/uwin.h	18 May 2004 01:09:03 -0000
@@ -55,9 +55,6 @@ Boston, MA 02111-1307, USA.  */
 #define LIB_SPEC \
   "%{pg:-lgmon} %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
 
-/* This is needed in g77spec.c for now. Will be removed in the future.  */
-#define WIN32_UWIN_TARGET 1
-
 /* Include in the mingw32 libraries with libgcc */
 #undef LIBGCC_SPEC
 #define LIBGCC_SPEC "-lgnuwin -lposix -lgcc -last -lmoldname -lmsvcrt"
===================================================================
Index: gcc/doc/invoke.texi
--- gcc/doc/invoke.texi	15 May 2004 12:41:29 -0000	1.461
+++ gcc/doc/invoke.texi	18 May 2004 01:09:04 -0000
@@ -43,8 +43,8 @@ remainder.  @samp{g++} accepts mostly th
 @c man end
 @c man begin SEEALSO
 gpl(7), gfdl(7), fsf-funding(7),
-cpp(1), gcov(1), g77(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)
-and the Info entries for @file{gcc}, @file{cpp}, @file{g77}, @file{as},
+cpp(1), gcov(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)
+and the Info entries for @file{gcc}, @file{cpp}, @file{as},
 @file{ld}, @file{binutils} and @file{gdb}.
 @c man end
 @c man begin BUGS
@@ -772,10 +772,6 @@ preprocessor (not included with GCC)@.
 @item @var{file}.f90
 @itemx @var{file}.f95
 Fortran 90/95 source code which should not be preprocessed.
-
-@xref{Overall Options,,Options Controlling the Kind of Output, g77,
-Using and Porting GNU Fortran}, for more details of the handling of
-Fortran input files.
 
 @c FIXME: Descriptions of Java file types.
 @c @var{file}.java
===================================================================
Index: gcc/doc/standards.texi
--- gcc/doc/standards.texi	13 May 2004 06:40:27 -0000	1.13
+++ gcc/doc/standards.texi	18 May 2004 01:09:04 -0000
@@ -185,9 +185,6 @@ HTML format.
 GNAT Reference Manual}, for information on standard
 conformance and compatibility of the Ada compiler.
 
-@xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU
-Fortran}, for details of the Fortran language supported by @command{g77}.
-
 @xref{Standards,,Standards, gfortran, The GNU Fortran 95 Compiler}, for details
 of standards supported by @command{gfortran}.
 
===================================================================
Index: gcc/po/exgettext
--- gcc/po/exgettext	20 Nov 2003 10:17:03 -0000	1.8
+++ gcc/po/exgettext	18 May 2004 01:09:04 -0000
@@ -112,18 +112,21 @@ function spec_error_string (line) {
     while ((percent_index = index(line, "%e")) != 0) {
 	escape = substr(line, percent_index - 1, 1)
 	line = substr(line, percent_index + 2)
-	if (escape == "%") return
+	if (escape == "%") continue
 
 	bracket_index = index(line, "}")
+	quote_index = index(line, "\"")
 	if (bracket_index == 0) return
+	if (quote_index != 0 && bracket_index > quote_index) return
 
 	msgid = substr(line, 1, bracket_index - 1)
-	if (index(msgid, "%") != 0) return
+	line = substr(line, bracket_index + 1)
+
+	if (index(msgid, "%") != 0) continue
 
 	printf("#line %d \"%s\"\n", lineno, file) > emsg
 	printf("_(\"%s\")\n", msgid) > emsg
 
-	line = substr(line, bracket_index + 1)
     }
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]