From b37421c62a163edcc389bb32df13b7589cfe5715 Mon Sep 17 00:00:00 2001
From: Joseph Myers <joseph@codesourcery.com>
Date: Wed, 17 Nov 2010 14:31:07 +0000
Subject: [PATCH] invoke.texi (-dy): Remove.

	* doc/invoke.texi (-dy): Remove.
	* langhooks-def.h (lhd_do_nothing_i): Don't declare.
	(LANG_HOOKS_PARSE_FILE): Define to lhd_do_nothing.
	* langhooks.c (lhd_do_nothing_i): Remove.
	* langhooks.h (lang_hooks.parse_file): Take no arguments.
	* toplev.c (set_yydebug): Remove.
	(compile_file): Update call to lang_hooks.parse_file.
	(decode_d_option): Don't handle -dy.

ada:
	* gcc-interface/misc.c (gnat_parse_file): Take no arguments.

c-family:
	* c-opts.c (c_common_parse_file): Take no arguments.
	* c-common.h (c_common_parse_file): Update prototype.

fortran:
	* f95-lang.c (gfc_be_parse_file): Take no arguments.

java:
	* jcf-parse.c (java_parse_file): Take no arguments.
	* java-tree.h (java_parse_file): Update prototype.

lto:
	* lto.c (lto_main): Take no arguments.
	* lto.h (lto_main): Update prototype.

From-SVN: r166868
---
 gcc/ChangeLog                | 11 +++++++++++
 gcc/ada/ChangeLog            |  4 ++++
 gcc/ada/gcc-interface/misc.c |  2 +-
 gcc/c-family/ChangeLog       |  5 +++++
 gcc/c-family/c-common.h      |  2 +-
 gcc/c-family/c-opts.c        | 23 +----------------------
 gcc/doc/invoke.texi          |  4 ----
 gcc/fortran/ChangeLog        |  4 ++++
 gcc/fortran/f95-lang.c       |  4 ++--
 gcc/java/ChangeLog           |  5 +++++
 gcc/java/java-tree.h         |  2 +-
 gcc/java/jcf-parse.c         |  2 +-
 gcc/langhooks-def.h          |  3 +--
 gcc/langhooks.c              |  7 -------
 gcc/langhooks.h              |  5 ++---
 gcc/lto/ChangeLog            |  5 +++++
 gcc/lto/lto.c                |  2 +-
 gcc/lto/lto.h                |  2 +-
 gcc/toplev.c                 |  8 +-------
 19 files changed, 47 insertions(+), 53 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3fa0b566d4db..71b28f5b6606 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* doc/invoke.texi (-dy): Remove.
+	* langhooks-def.h (lhd_do_nothing_i): Don't declare.
+	(LANG_HOOKS_PARSE_FILE): Define to lhd_do_nothing.
+	* langhooks.c (lhd_do_nothing_i): Remove.
+	* langhooks.h (lang_hooks.parse_file): Take no arguments.
+	* toplev.c (set_yydebug): Remove.
+	(compile_file): Update call to lang_hooks.parse_file.
+	(decode_d_option): Don't handle -dy.
+
 2010-11-17  Jakub Jelinek  <jakub@redhat.com>
 
 	PR rtl-optimization/46440
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 07ccf3ee4fee..b6210537a069 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* gcc-interface/misc.c (gnat_parse_file): Take no arguments.
+
 2010-11-17  Eric Botcazou  <ebotcazou@adacore.com>
 
 	* gcc-interface/trans.c (addressable_p): Rewrite obsolete paragraph in
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 40f0db874ff9..ed66f8b94221 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -77,7 +77,7 @@ extern void _ada_gnat1drv (void);
 /* The parser for the language.  For us, we process the GNAT tree.  */
 
 static void
-gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
+gnat_parse_file (void)
 {
   int seh[2];
 
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 57d3ab833740..81e636c28f50 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* c-opts.c (c_common_parse_file): Take no arguments.
+	* c-common.h (c_common_parse_file): Update prototype.
+
 2010-11-16  Jakub Jelinek  <jakub@redhat.com>
 
 	PR c++/46401
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index cddad17348fe..76842d2ded1b 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -771,7 +771,7 @@ extern void c_common_init_options (unsigned int, struct cl_decoded_option *);
 extern bool c_common_post_options (const char **);
 extern bool c_common_init (void);
 extern void c_common_finish (void);
-extern void c_common_parse_file (int);
+extern void c_common_parse_file (void);
 extern alias_set_type c_common_get_alias_set (tree);
 extern void c_register_builtin_type (tree, const char*);
 extern bool c_promoting_integer_type_p (const_tree);
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 46f6c780ea65..3d70136ee0e0 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -1057,31 +1057,10 @@ c_common_init (void)
 /* Initialize the integrated preprocessor after debug output has been
    initialized; loop over each input file.  */
 void
-c_common_parse_file (int set_yydebug)
+c_common_parse_file (void)
 {
   unsigned int i;
 
-  if (set_yydebug)
-    switch (c_language)
-      {
-      case clk_c:
-	warning(0, "the C parser does not support -dy, option ignored");
-	break;
-      case clk_objc:
-	warning(0,
-		"the Objective-C parser does not support -dy, option ignored");
-	break;
-      case clk_cxx:
-	warning(0, "the C++ parser does not support -dy, option ignored");
-	break;
-      case clk_objcxx:
-	warning(0,
-	    "the Objective-C++ parser does not support -dy, option ignored");
-	break;
-      default:
-	gcc_unreachable ();
-    }
-
   i = 0;
   for (;;)
     {
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9509b835c9c8..0aebe4524fd5 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5275,10 +5275,6 @@ to @file{@var{file}.@var{pass}.vcg}.
 @opindex dx
 Just generate RTL for a function instead of compiling it.  Usually used
 with @option{-fdump-rtl-expand}.
-
-@item -dy
-@opindex dy
-Dump debugging information during parsing, to standard error.
 @end table
 
 @item -fdump-noaddr
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 61a0df6792e4..0961df3c25af 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* f95-lang.c (gfc_be_parse_file): Take no arguments.
+
 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 	    Tobias Burnus  <burnus@net-b.de>
 
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 57696e5a2b74..3ed500b8587f 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -93,7 +93,7 @@ static void gfc_print_identifier (FILE *, tree, int);
 void do_function_end (void);
 int global_bindings_p (void);
 static void clear_binding_stack (void);
-static void gfc_be_parse_file (int);
+static void gfc_be_parse_file (void);
 static alias_set_type gfc_get_alias_set (tree);
 static void gfc_init_ts (void);
 
@@ -241,7 +241,7 @@ gfc_create_decls (void)
 
 
 static void
-gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
+gfc_be_parse_file (void)
 {
   int errors;
   int warnings;
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 825f02fc11be..05cbb037509c 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* jcf-parse.c (java_parse_file): Take no arguments.
+	* java-tree.h (java_parse_file): Update prototype.
+
 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
 	    Andrew Haley  <aph@redhat.com>
 
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index d7c9996c5cde..3addcca09e7a 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -939,7 +939,7 @@ struct GTY((variable_size)) lang_type {
 /* Defined in java-except.h  */
 struct eh_range;
 
-extern void java_parse_file (int);
+extern void java_parse_file (void);
 extern tree java_type_for_mode (enum machine_mode, int);
 extern tree java_type_for_size (unsigned int, int);
 extern tree java_truthvalue_conversion (tree);
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index ce1de5ae79de..28d9ad442228 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -1732,7 +1732,7 @@ java_emit_static_constructor (void)
 
 
 void
-java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
+java_parse_file (void)
 {
   int filename_count = 0;
   location_t save_location = input_location;
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index 822925fcb0eb..961e929b61fa 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -37,7 +37,6 @@ struct diagnostic_info;
 
 extern void lhd_do_nothing (void);
 extern void lhd_do_nothing_t (tree);
-extern void lhd_do_nothing_i (int);
 extern void lhd_do_nothing_f (struct function *);
 extern tree lhd_pass_through_t (tree);
 extern bool lhd_post_options (const char **);
@@ -85,7 +84,7 @@ extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
 #define LANG_HOOKS_IDENTIFIER_SIZE	sizeof (struct lang_identifier)
 #define LANG_HOOKS_INIT			hook_bool_void_false
 #define LANG_HOOKS_FINISH		lhd_do_nothing
-#define LANG_HOOKS_PARSE_FILE		lhd_do_nothing_i
+#define LANG_HOOKS_PARSE_FILE		lhd_do_nothing
 #define LANG_HOOKS_OPTION_LANG_MASK	hook_uint_void_0
 #define LANG_HOOKS_INIT_OPTIONS_STRUCT	hook_void_gcc_optionsp
 #define LANG_HOOKS_INIT_OPTIONS		lhd_init_options
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 1f656fe574ee..80efd32580d1 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -62,13 +62,6 @@ lhd_pass_through_t (tree t)
   return t;
 }
 
-/* Do nothing (int).  */
-
-void
-lhd_do_nothing_i (int ARG_UNUSED (i))
-{
-}
-
 /* Do nothing (int, int, int).  Return NULL_TREE.  */
 
 tree
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 87a8b2c62148..a9947293e919 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -317,9 +317,8 @@ struct lang_hooks
   /* Called at the end of compilation, as a finalizer.  */
   void (*finish) (void);
 
-  /* Parses the entire file.  The argument is nonzero to cause bison
-     parsers to dump debugging information during parsing.  */
-  void (*parse_file) (int);
+  /* Parses the entire file.  */
+  void (*parse_file) (void);
 
   /* Determines if it's ok for a function to have no noreturn attribute.  */
   bool (*missing_noreturn_ok_p) (tree);
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index c254da1a5fae..8b026724cb39 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-17  Joseph Myers  <joseph@codesourcery.com>
+
+	* lto.c (lto_main): Take no arguments.
+	* lto.h (lto_main): Update prototype.
+
 2010-11-16  Ian Lance Taylor  <iant@google.com>
 
 	* lto-object.c (lto_obj_file_open): Call
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index d3b9228b6a83..44f866ad075b 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2437,7 +2437,7 @@ lto_process_name (void)
      simply applies them.  */
 
 void
-lto_main (int debug_p ATTRIBUTE_UNUSED)
+lto_main (void)
 {
   lto_process_name ();
 
diff --git a/gcc/lto/lto.h b/gcc/lto/lto.h
index 47d9973b31fe..8110ace27497 100644
--- a/gcc/lto/lto.h
+++ b/gcc/lto/lto.h
@@ -37,7 +37,7 @@ extern const char *resolution_file_name;
 
 /* In lto.c  */
 extern tree lto_eh_personality (void);
-extern void lto_main (int);
+extern void lto_main (void);
 extern void lto_read_all_file_options (void);
 
 /* In lto-elf.c or lto-coff.c  */
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3f158a4426df..7c91b06bb7c5 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -117,9 +117,6 @@ static void crash_signal (int) ATTRIBUTE_NORETURN;
 static void setup_core_dumping (void);
 static void compile_file (void);
 
-/* Nonzero to dump debug info whilst parsing (-dy option).  */
-static int set_yydebug;
-
 /* True if we don't need a backend (e.g. preprocessing only).  */
 static bool no_backend;
 
@@ -870,7 +867,7 @@ compile_file (void)
 
   /* Call the parser, which parses the entire file (calling
      rest_of_compilation for each function).  */
-  lang_hooks.parse_file (set_yydebug);
+  lang_hooks.parse_file ();
 
   /* Compilation is now finished except for writing
      what's left of the symbol table output.  */
@@ -993,9 +990,6 @@ decode_d_option (const char *arg)
       case 'x':
 	rtl_dump_and_exit = 1;
 	break;
-      case 'y':
-	set_yydebug = 1;
-	break;
       case 'D':	/* These are handled by the preprocessor.  */
       case 'I':
       case 'M':
-- 
GitLab