Kill lang-options.h

Neil Booth neil@daikokuya.co.uk
Thu Jul 17 22:23:00 GMT 2003


Removes ada/lang-options.h and java/lang-options.h and the
infrastructure for handling lang-options.h.

Neil.

	* Makefile.in, configure, configure.in: Remove handling of
	lang-options.h and options_.h.
	* toplev.c (struct lang_opt, documented_lang_options): Remove.
	(display_help): Don't use documented_lang_options.
ada:
	* lang-options.h: Remove.
	* lang.opt: Add help text.
java:
	* lang-options.h: Remove.
	* lang.opt: Add help text.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1117
diff -u -p -r1.1117 Makefile.in
--- Makefile.in	17 Jul 2003 20:29:40 -0000	1.1117
+++ Makefile.in	17 Jul 2003 22:19:47 -0000
@@ -356,7 +356,6 @@ xm_file=@xm_file@
 xm_defines=@xm_defines@
 lang_opt_files=@lang_opt_files@ $(srcdir)/c.opt $(srcdir)/common.opt
 lang_specs_files=@lang_specs_files@
-lang_options_files=@lang_options_files@
 lang_tree_files=@lang_tree_files@
 target_cpu_default=@target_cpu_default@
 GCC_THREAD_FILE=@thread_file@
@@ -1406,14 +1405,6 @@ s-gencheck : Makefile
 	$(SHELL) $(srcdir)/move-if-change tmp-gencheck.h gencheck.h
 	$(STAMP) s-gencheck
 
-options_.h : s-options ; @true
-s-options : Makefile
-	lof="$(lang_options_files)"; for f in $$lof; do \
-	    echo "#include \"$$f\""; \
-	done | sed 's|$(srcdir)/||' > tmp-options_.h
-	$(SHELL) $(srcdir)/move-if-change tmp-options_.h options_.h
-	$(STAMP) s-options
-
 specs.h : s-specs ; @true
 s-specs : Makefile
 	lsf="$(lang_specs_files)"; for f in $$lsf; do \
@@ -1491,9 +1482,9 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM
    function.h flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
    debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
-   graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \
+   graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) \
    ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
-   langhooks.h insn-flags.h options_.h cfglayout.h real.h cfgloop.h \
+   langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
    hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H)
 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	  -DTARGET_NAME=\"$(target_alias)\" \
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure,v
retrieving revision 1.721
diff -u -p -r1.721 configure
--- configure	13 Jul 2003 02:53:00 -0000	1.721
+++ configure	17 Jul 2003 22:19:49 -0000
@@ -7519,7 +7519,6 @@ fi
 
 lang_opt_files=
 lang_specs_files=
-lang_options_files=
 lang_tree_files=
 for subdir in . $subdirs
 do
@@ -7529,9 +7528,6 @@ do
 	if test -f $srcdir/$subdir/lang-specs.h; then
 	    lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
 	fi
-	if test -f $srcdir/$subdir/lang-options.h; then
-	    lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
-	fi
 	if test -f $srcdir/$subdir/$subdir-tree.def; then
 	    lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
 	fi
@@ -8101,7 +8097,6 @@ s%@host_xm_defines@%$host_xm_defines%g
 s%@out_host_hook_obj@%$out_host_hook_obj%g
 s%@install@%$install%g
 s%@lang_opt_files@%$lang_opt_files%g
-s%@lang_options_files@%$lang_options_files%g
 s%@lang_specs_files@%$lang_specs_files%g
 s%@lang_tree_files@%$lang_tree_files%g
 s%@local_prefix@%$local_prefix%g
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.705
diff -u -p -r1.705 configure.in
--- configure.in	13 Jul 2003 02:53:00 -0000	1.705
+++ configure.in	17 Jul 2003 22:19:50 -0000
@@ -2661,7 +2661,6 @@ AC_SUBST(MAINT)dnl
 
 lang_opt_files=
 lang_specs_files=
-lang_options_files=
 lang_tree_files=
 for subdir in . $subdirs
 do
@@ -2671,9 +2670,6 @@ do
 	if test -f $srcdir/$subdir/lang-specs.h; then
 	    lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
 	fi
-	if test -f $srcdir/$subdir/lang-options.h; then
-	    lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
-	fi
 	if test -f $srcdir/$subdir/$subdir-tree.def; then
 	    lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
 	fi
@@ -2912,7 +2908,6 @@ AC_SUBST(host_xm_defines)
 AC_SUBST(out_host_hook_obj)
 AC_SUBST(install)
 AC_SUBST(lang_opt_files)
-AC_SUBST(lang_options_files)
 AC_SUBST(lang_specs_files)
 AC_SUBST(lang_tree_files)
 AC_SUBST(local_prefix)
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.809
diff -u -p -r1.809 toplev.c
--- toplev.c	17 Jul 2003 05:33:09 -0000	1.809
+++ toplev.c	17 Jul 2003 22:19:51 -0000
@@ -1179,22 +1179,6 @@ static const lang_independent_options f_
   { "new-ra", &flag_new_regalloc, 1 }
 };
 
-/* Table of language-specific options.  */
-
-static const struct lang_opt
-{
-  const char *const option;
-  const char *const description;
-}
-documented_lang_options[] =
-{
-#define DEFINE_LANG_NAME(NAME) { NULL, NAME },
-
-#include "options_.h"
-
-  { NULL, "Dummy" }
-};
-
 /* Here is a table, controlled by the tm.h file, listing each -m switch
    and which bits in `target_switches' it should set or clear.
    If VALUE is positive, it is bits to set.
@@ -3605,9 +3589,7 @@ rest_of_compilation (tree decl)
 void
 display_help (void)
 {
-  int undoc;
   unsigned long i;
-  const char *lang;
 
   for (i = LAST_PARAM; i--;)
     {
@@ -3627,56 +3609,6 @@ display_help (void)
 	printf ("  -g%-21s %s\n",
 		debug_args[i].arg, _(debug_args[i].description));
     }
-
-  undoc = 0;
-  lang  = "language";
-
-  /* Display descriptions of language specific options.
-     If there is no description, note that there is an undocumented option.
-     If the description is empty, do not display anything.  (This allows
-     options to be deliberately undocumented, for whatever reason).
-     If the option string is missing, then this is a marker, indicating
-     that the description string is in fact the name of a language, whose
-     language specific options are to follow.  */
-
-  if (ARRAY_SIZE (documented_lang_options) > 1)
-    {
-      printf (_("\nLanguage specific options:\n"));
-
-      for (i = 0; i < ARRAY_SIZE (documented_lang_options); i++)
-	{
-	  const char *description = documented_lang_options[i].description;
-	  const char *option      = documented_lang_options[i].option;
-
-	  if (description == NULL)
-	    {
-	      undoc = 1;
-
-	      if (extra_warnings)
-		printf (_("  %-23s [undocumented]\n"), option);
-	    }
-	  else if (*description == 0)
-	    continue;
-	  else if (option == NULL)
-	    {
-	      if (undoc)
-		printf
-		  (_("\nThere are undocumented %s specific options as well.\n"),
-			lang);
-	      undoc = 0;
-
-	      printf (_("\n Options for %s:\n"), description);
-
-	      lang = description;
-	    }
-	  else
-	    printf ("  %-23s %s\n", option, _(description));
-	}
-    }
-
-  if (undoc)
-    printf (_("\nThere are undocumented %s specific options as well.\n"),
-	    lang);
 
   display_target_options ();
 }
Index: ada/lang-options.h
===================================================================
RCS file: ada/lang-options.h
diff -N ada/lang-options.h
--- ada/lang-options.h	23 Oct 2002 07:33:26 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,38 +0,0 @@
-/****************************************************************************
- *                                                                          *
- *                         GNAT COMPILER COMPONENTS                         *
- *                                                                          *
- *                          L A N G - O P T I O N S                         *
- *                                                                          *
- *                              C Header File                               *
- *                                                                          *
- *                                                                          *
- *           Copyright (C) 1992-2001 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.                                                      *
- *                                                                          *
- * GNAT was originally developed  by the GNAT team at  New York University. *
- * Extensive contributions were provided by Ada Core Technologies Inc.      *
- *                                                                          *
- ****************************************************************************/
-
-DEFINE_LANG_NAME ("Ada")
-
-/* This is the contribution to the `lang_options' array in gcc.c for
-   GNAT.  */
-
-  {"-gnat", "Specify options to GNAT"},
-  {"-gant", ""},
-  {"-I", "Name of directory to search for sources"},
-  {"-nostdinc", "Don't use system library for sources"},
-
-
Index: ada/lang.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/lang.opt,v
retrieving revision 1.4
diff -u -p -r1.4 lang.opt
--- ada/lang.opt	15 Jun 2003 14:56:30 -0000	1.4
+++ ada/lang.opt	17 Jul 2003 22:19:51 -0000
@@ -27,17 +27,21 @@ Ada
 
 I
 Ada Joined Separate
+; Documented for C
 
 Wall
 Ada
+; Documented for C
 
 fRTS
 Ada RejectNegative
 
 gant
-Ada Joined
+Ada Joined Undocumented
+; Catches typos
 
 gnat
 Ada Joined
+-gnat<option>	Specify options to GNAT
 
 ; This comment is to ensure we retain the blank line above.
Index: java/lang-options.h
===================================================================
RCS file: java/lang-options.h
diff -N java/lang-options.h
--- java/lang-options.h	24 Feb 2003 02:14:49 -0000	1.34
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
-/* Switch definitions for the GNU compiler for the Java(TM) language.
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
-   Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT 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
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  
-
-Java and all Java-based marks are trademarks or registered trademarks
-of Sun Microsystems, Inc. in the United States and other countries.
-The Free Software Foundation is independent of Sun Microsystems, Inc.  */
-
-/* This is the contribution to the `documented_lang_options' array in
-   toplev.c for java.  */
-
-DEFINE_LANG_NAME ("Java")
-
-  { "-fbounds-check", "" },
-  { "-fno-bounds-check",
-    N_("Disable automatic array bounds checking") },
-  { "-fno-store-check",
-    N_("Disable assignability checks for stores into object arrays") },
-  { "-fjni",
-    N_("Assume native functions are implemented using JNI") },
-  { "--bootclasspath",
-    N_("Replace system path") },
-  { "--classpath",
-    N_("Set class path") },
-  { "--CLASSPATH",
-    N_("Set class path (deprecated: use --classpath instead)") },
-  { "--main",
-    N_("Choose class whose main method should be used") },
-  { "--encoding",
-    N_("Choose input encoding (default comes from locale)") },
-  { "-I",
-    N_("Add directory to class path") },
-  { "-d",
-    N_("Directory where class files should be written") },
-  { "-Wredundant-modifiers", 
-    N_("Warn if modifiers are specified when not necessary") },
-  { "-Wextraneous-semicolon",
-    N_("Warn if deprecated empty statements are found") },
-  { "-Wout-of-date",
-    N_("Warn if .class files are out of date") },
-  { "-Wdeprecated",
-    N_("Warn if deprecated class, method, or field is used") },
-  { "-fforce-classes-archive-check", 
-    N_("Always check for non gcj generated classes archives") },
-  { "-fno-optimize-static-class-initialization",
-    N_("Never optimize static class initialization code") },
-  { "-findirect-dispatch",
-    N_("Use offset tables for virtual method calls") },
Index: java/lang.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lang.opt,v
retrieving revision 1.4
diff -u -p -r1.4 lang.opt
--- java/lang.opt	16 Jun 2003 05:47:07 -0000	1.4
+++ java/lang.opt	17 Jul 2003 22:19:53 -0000
@@ -27,45 +27,59 @@ Java
 
 I
 Java Joined
+; Documented for C
 
 M
 Java
+; Documented for C
 
 MD_
 Java
+; Documented for C
 
 MF
 Java Separate
+; Documented for C
 
 MM
 Java
+; Documented for C
 
 MMD_
 Java
+; Documented for C
 
 MP
 Java
+; Documented for C
 
 MT
 Java Separate
+; Documented for C
 
 Wall
 Java
+; Documented for C
 
 Wdeprecated
 Java
+Warn if deprecated class, method, or field is used
 
 Wextraneous-semicolon
 Java
+Warn if deprecated empty statements are found
 
 Wout-of-date
 Java
+Warn if .class files are out of date
 
 Wredundant-modifiers
 Java
+Warn if modifiers are specified when not necessary
 
 fCLASSPATH=
 Java JoinedOrMissing RejectNegative
+--CLASSPATH	Deprecated; use --classpath instead
 
 fassert
 Java
@@ -78,12 +92,14 @@ Java JoinedOrMissing
 
 fbootclasspath=
 Java JoinedOrMissing RejectNegative
+--bootclasspath=<path>	Replace system path
 
 fcheck-references
 Java
 
 fclasspath=
 Java JoinedOrMissing RejectNegative
+--classpath=<path>	Set class path
 
 fcompile-resource=
 Java Joined RejectNegative
@@ -99,6 +115,7 @@ Java
 
 fencoding=
 Java Joined RejectNegative
+--encoding=<encoding>	Choose input encoding (defaults from your locale)
 
 fextdirs=
 Java Joined RejectNegative
@@ -108,27 +125,32 @@ Java
 
 fforce-classes-archive-check
 Java
+Always check for non gcj generated classes archives
 
 fhash-synchronization
 Java
 
 findirect-dispatch
 Java
+Use offset tables for virtual method calls
 
 finline-functions
 Java
 
 fjni
 Java
+Assume native functions are implemented using JNI
 
 foptimize-static-class-initialization
 Java
+Enable optimization of static class initialization code
 
 foutput-class-dir=
 Java Joined RejectNegative
 
 fstore-check
 Java
+Enable assignability checks for stores into object arrays
 
 fuse-boehm-gc
 Java



More information about the Gcc-patches mailing list