]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-common.h (c_common_parse_file): Update.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Thu, 25 Apr 2002 06:24:41 +0000 (06:24 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 25 Apr 2002 06:24:41 +0000 (06:24 +0000)
* c-common.h (c_common_parse_file): Update.
* c-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
* c-lex.c (YYDEBUG): Get from c-lex.h.
(c_common_parse_file): Update.
* c-lex.h (YYDEBUG, yydebug): New.
* c-parse.in (YYDEBUG): Get from c-lex.h.
(c_set_yydebug): Remove.
* c-tree.h (c_set_yydebug): Remove.
* langhooks-def.h (lhd_do_nothing_i): New.
(lhd_set_yydebug, LANG_HOOKS_SET_YYDEBUG): Remove.
(LANG_HOOKS_PARSE_FILE, LANG_HOOKS_INITIALIZER): Update.
* langhooks.c  (lhd_do_nothing_i): New.
(lhd_set_yydebug): Remove.
* langhooks.h (struct lang_hooks): Update.
* toplev.c (set_yydebug): New.
(compile_file): Update call to parse_file hook.
(decode_d_option): Update.
ada:
* misc.c (gnat_parse_file): Update.
cp:
* cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
* cp-tree.h (cxx_set_yydebug): Die.
* lex.c (YYDEBUG): Get from c-lex.h.
(cxx_set_yydebug): Remove.
* parse.y: Include c-lex.h.
(YYDEBUG): Get from c-lex.h.
f:
* com.h (ffe_parse_file): Update.
* lex.c (ffe_parse_file): Update.
java:
* java-tree.h (java_parse_file): Update.
(java_set_yydebug): Remove.
* jcf-parse.c (yydebug): Remove.
(java_set_yydebug): Die.
(java_parse_file): Update.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
objc:
* objc-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.

From-SVN: r52753

26 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/c-common.h
gcc/c-lang.c
gcc/c-lex.c
gcc/c-lex.h
gcc/c-parse.in
gcc/c-tree.h
gcc/cp/ChangeLog
gcc/cp/cp-lang.c
gcc/cp/cp-tree.h
gcc/cp/lex.c
gcc/cp/parse.y
gcc/f/ChangeLog
gcc/f/com.h
gcc/f/parse.c
gcc/java/ChangeLog
gcc/java/java-tree.h
gcc/java/jcf-parse.c
gcc/java/lang.c
gcc/langhooks-def.h
gcc/langhooks.c
gcc/langhooks.h
gcc/objc/objc-lang.c
gcc/toplev.c

index 37e68d759c5a0580b3df369a61b731008246bb14..f4cd53516a65639a718b8352c2785ed762140cf0 100644 (file)
@@ -1,3 +1,25 @@
+2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * c-common.h (c_common_parse_file): Update.
+       * c-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
+       * c-lex.c (YYDEBUG): Get from c-lex.h.
+       (c_common_parse_file): Update.
+       * c-lex.h (YYDEBUG, yydebug): New.
+       * c-parse.in (YYDEBUG): Get from c-lex.h.
+       (c_set_yydebug): Remove.
+       * c-tree.h (c_set_yydebug): Remove.
+       * langhooks-def.h (lhd_do_nothing_i): New.
+       (lhd_set_yydebug, LANG_HOOKS_SET_YYDEBUG): Remove.
+       (LANG_HOOKS_PARSE_FILE, LANG_HOOKS_INITIALIZER): Update.
+       * langhooks.c  (lhd_do_nothing_i): New.
+       (lhd_set_yydebug): Remove.
+       * langhooks.h (struct lang_hooks): Update.
+       * toplev.c (set_yydebug): New.
+       (compile_file): Update call to parse_file hook.
+       (decode_d_option): Update.
+objc:
+       * objc-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
+
 Wed Apr 24 23:45:37 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * loop.c (load_mems): Don't change the interface of called functions.
index 8ec214ce1a3dc3797ebb5be07b99ab1c296ad946..492dd09db084e383e7b6d7c21d4d17400e3ccaac 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * misc.c (gnat_parse_file): Update.
+
 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * misc.c (gnat_init): Don't set lang_attribute_common.
index 20b2b014f91abe64f19d3efb02d2783eb3ca8fb7..63ac00a0e875b278b4c29cb5abcdeec4bbedeea0 100644 (file)
@@ -85,7 +85,7 @@ static void gnat_print_type           PARAMS ((FILE *, tree, int));
 static const char *gnat_printable_name PARAMS  ((tree, int));
 static tree gnat_eh_runtime_type       PARAMS ((tree));
 static int gnat_eh_type_covers         PARAMS ((tree, tree));
-static void gnat_parse_file            PARAMS ((void));
+static void gnat_parse_file            PARAMS ((int));
 static void gnat_mark_tree             PARAMS ((tree));
 static rtx gnat_expand_expr            PARAMS ((tree, rtx, enum machine_mode,
                                                 int));
@@ -192,7 +192,8 @@ extern void _ada_gnat1drv   PARAMS((void));
 /* The parser for the language.  For us, we process the GNAT tree.  */
 
 static void
-gnat_parse_file ()
+gnat_parse_file (set_yydebug)
+     int set_yydebug ATTRIBUTE_UNUSED;
 {
   /* call the target specific initializations */
   __gnat_initialize();
index bce32e349a8d0fa5f0237a8a183c924955cb9748..f44b0c3a46ccde6efbb3d13d34c89d14673a8f0f 100644 (file)
@@ -568,7 +568,7 @@ extern void c_common_init_options           PARAMS ((enum c_language_kind));
 extern void c_common_post_options              PARAMS ((void));
 extern const char *c_common_init               PARAMS ((const char *));
 extern void c_common_finish                    PARAMS ((void));
-extern void c_common_parse_file                        PARAMS ((void));
+extern void c_common_parse_file                        PARAMS ((int));
 extern HOST_WIDE_INT c_common_get_alias_set    PARAMS ((tree));
 extern bool c_promoting_integer_type_p         PARAMS ((tree));
 extern int self_promoting_args_p               PARAMS ((tree));
index f8f5b127c83695021895e7ad07763a0c335034d0..225967d61d17a17cc40aee07507d3f0f88781ca8 100644 (file)
@@ -72,8 +72,6 @@ static void c_post_options PARAMS ((void));
 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl
 #undef LANG_HOOKS_PRINT_IDENTIFIER
 #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
-#undef LANG_HOOKS_SET_YYDEBUG
-#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
 #undef LANG_HOOKS_FUNCTION_ENTER_NESTED
 #define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context
 #undef LANG_HOOKS_FUNCTION_LEAVE_NESTED
index f2f8c8c7317daf626a8bfbe2b418fa64833969e2..30ef877f0b947aef28e29bb6b879c75fa31499a5 100644 (file)
@@ -58,9 +58,6 @@ static unsigned int src_lineno;
 static int header_time, body_time;
 static splay_tree file_info_tree;
 
-/* Cause the `yydebug' variable to be defined.  */
-#define YYDEBUG 1
-
 /* File used for outputting assembler code.  */
 extern FILE *asm_out_file;
 
@@ -149,8 +146,15 @@ init_c_lex (filename)
    the primary source file.  */
 
 void
-c_common_parse_file ()
+c_common_parse_file (set_yydebug)
+     int set_yydebug ATTRIBUTE_UNUSED;
 {
+#if YYDEBUG != 0
+  yydebug = set_yydebug;
+#else
+  warning ("YYDEBUG not defined");
+#endif
+
   (*debug_hooks->start_source_file) (lineno, input_filename);
   cpp_finish_options (parse_in);
 
index 1e088dd22cd5aeb27d9b0458a5879411e0a62e5f..fed695d3394cc260ac237322abecccd73f0d8d39 100644 (file)
@@ -21,6 +21,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #ifndef GCC_C_LEX_H
 #define GCC_C_LEX_H
 
+/* Cause the `yydebug' variable to be defined.  */
+#define YYDEBUG 1
+extern int yydebug;
+
 extern tree make_pointer_declarator PARAMS ((tree, tree));
 
 extern int c_lex PARAMS ((tree *));
index f415e41e7c24ac29a2853fbf8305ca295e2e85c3..5835fe14e134fdd011fb7eee57ab82415276a959 100644 (file)
@@ -43,7 +43,7 @@ end ifc
 #include "cpplib.h"
 #include "intl.h"
 #include "timevar.h"
-#include "c-lex.h"
+#include "c-lex.h"             /* Gets YYDEBUG macro.  */
 #include "c-tree.h"
 #include "c-pragma.h"
 #include "flags.h"
@@ -61,9 +61,6 @@ end ifobjc
 
 /* Like YYERROR but do call yyerror.  */
 #define YYERROR1 { yyerror ("syntax error"); YYERROR; }
-
-/* Cause the "yydebug" variable to be defined.  */
-#define YYDEBUG 1
 %}
 
 %start program
@@ -3802,21 +3799,6 @@ yylex()
   return r;
 }
 
-/* Sets the value of the 'yydebug' variable to VALUE.
-   This is a function so we don't have to have YYDEBUG defined
-   in order to build the compiler.  */
-
-void
-c_set_yydebug (value)
-     int value;
-{
-#if YYDEBUG != 0
-  yydebug = value;
-#else
-  warning ("YYDEBUG not defined");
-#endif
-}
-
 /* Function used when yydebug is set, to print a token in more detail.  */
 
 static void
index eedaa7aa59342ed95d67cff5a89d84cdff6aaad7..7225f5d8a50bc454f22c00e9bc84bf28c46e2cc6 100644 (file)
@@ -160,7 +160,6 @@ extern tree lookup_objc_ivar                        PARAMS ((tree));
 \f
 /* in c-parse.in */
 extern void c_parse_init                       PARAMS ((void));
-extern void c_set_yydebug                      PARAMS ((int));
 
 /* in c-aux-info.c */
 extern void gen_aux_info_record                 PARAMS ((tree, int, int, int));
index ef5faf451b03ff78d028ae6fbb43dd2fab1d9136..ee39ddc544268040f6e60db49ae50d13fb7f7dfe 100644 (file)
@@ -1,3 +1,12 @@
+2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
+       * cp-tree.h (cxx_set_yydebug): Die.
+       * lex.c (YYDEBUG): Get from c-lex.h.
+       (cxx_set_yydebug): Remove.
+       * parse.y: Include c-lex.h.
+       (YYDEBUG): Get from c-lex.h.
+
 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/6438.
index 3a8417d8d2815d79a7e24fb6602d01d6986e0514..815ede9e5ba4dc0cfa4a06b0666c90964d01d4d5 100644 (file)
@@ -88,8 +88,6 @@ static bool cxx_warn_unused_global_decl PARAMS ((tree));
 #define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name
 #undef LANG_HOOKS_PRINT_ERROR_FUNCTION
 #define LANG_HOOKS_PRINT_ERROR_FUNCTION        cxx_print_error_function
-#undef LANG_HOOKS_SET_YYDEBUG
-#define LANG_HOOKS_SET_YYDEBUG cxx_set_yydebug
 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
 
index a692c98a2679f3c656c163150aebbcabd499a836..43b17c88cb332087881733b743508748ff029e47 100644 (file)
@@ -3615,7 +3615,6 @@ extern void cxx_print_type                        PARAMS ((FILE *, tree, int));
 extern void cxx_print_identifier               PARAMS ((FILE *, tree, int));
 extern void cxx_print_error_function   PARAMS ((struct diagnostic_context *,
                                                 const char *));
-extern void cxx_set_yydebug                    PARAMS ((int));
 extern void build_self_reference               PARAMS ((void));
 extern int same_signature_p                    PARAMS ((tree, tree));
 extern void warn_hidden                                PARAMS ((tree));
index 2f6148711a46792fcd998579f5d2c8c15665d78e..7e4657c1586986c69a7f22543c8cff4334cccebb 100644 (file)
@@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA.  */
 
 /* This file is the lexical analyzer for GNU C++.  */
 
-/* Cause the `yydebug' variable to be defined.  */
-#define YYDEBUG 1
-
 #include "config.h"
 #include "system.h"
 #include "input.h"
@@ -846,22 +843,6 @@ print_parse_statistics ()
 #endif
 }
 
-/* Sets the value of the 'yydebug' variable to VALUE.
-   This is a function so we don't have to have YYDEBUG defined
-   in order to build the compiler.  */
-
-void
-cxx_set_yydebug (value)
-     int value;
-{
-#if YYDEBUG != 0
-  extern int yydebug;
-  yydebug = value;
-#else
-  warning ("YYDEBUG not defined");
-#endif
-}
-
 /* Helper function to load global variables with interface
    information.  */
 
index 491c83ee84cbbada8db8a82b16ace8945778dad5..627e7343e13e01374ea8e0aac87f2163323cfab3 100644 (file)
@@ -28,9 +28,6 @@ Boston, MA 02111-1307, USA.  */
    is given.  Keep this in mind when reading the actions.  */
 
 %{
-/* Cause the `yydebug' variable to be defined.  */
-#define YYDEBUG 1
-
 #include "config.h"
 
 #include "system.h"
@@ -40,6 +37,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "cp-tree.h"
 #include "lex.h"
+#include "c-lex.h"             /* For YYDEBUG definition.  */
 #include "output.h"
 #include "except.h"
 #include "toplev.h"
index 361c965cad9889a76caf9b39821d1f8cda151c97..2e1df829fe4610be9e8e564cecac6e210dcc22a5 100644 (file)
@@ -1,3 +1,8 @@
+Thu Apr 25 07:44:44 2002  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * com.h (ffe_parse_file): Update.
+       * lex.c (ffe_parse_file): Update.
+
 2002-04-20  Toon Moene  <toon@moene.indiv.nluug.nl>
 
        * root.texi: Remove variable version-g77.
index 90d231cfeca401383d95f60c2df8f11140aed8a2..be49242ff921b5ab6895bb0571d39ebd3e7d0416 100644 (file)
@@ -270,7 +270,7 @@ tree ffecom_truth_value (tree expr);
 tree ffecom_truth_value_invert (tree expr);
 tree ffecom_type_expr (ffebld expr);
 tree ffecom_which_entrypoint_decl (void);
-void ffe_parse_file (void);
+void ffe_parse_file (int);
 
 /* Define macros. */
 
index fe48b6d4f9e7593f16b6e228151396f205ca5005..f687e592ec80486233aec40aab82029f9ed233ab 100644 (file)
@@ -29,7 +29,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 extern FILE *finput;
 
 void
-ffe_parse_file ()
+ffe_parse_file (set_yydebug)
+     int set_yydebug ATTRIBUTE_UNUSED;
 {
   ffewhereFile wf;
 
index d11cba1633d8c6600e8bc108173f8b1a9033fe04..2db0c12e9fb40df4f5e4d5b8d2e3521a8e010152 100644 (file)
@@ -1,3 +1,12 @@
+2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * java-tree.h (java_parse_file): Update.
+       (java_set_yydebug): Remove.
+       * jcf-parse.c (yydebug): Remove.
+       (java_set_yydebug): Die.
+       (java_parse_file): Update.
+       * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
+
 2002-04-24  Tom Tromey  <tromey@redhat.com>
 
        For PR java/6425:
index d6d698ca74f577c59b378f746724e60b8b6a2e59..f591b5fe33f43e3e69b80a48ac649735c4a4ba5c 100644 (file)
@@ -1036,8 +1036,7 @@ struct lang_type
 #define JCF_u4 unsigned long
 #define JCF_u2 unsigned short
 
-extern void java_set_yydebug PARAMS ((int));
-extern void java_parse_file PARAMS ((void));
+extern void java_parse_file PARAMS ((int));
 extern void java_mark_tree PARAMS ((tree));
 extern bool java_mark_addressable PARAMS ((tree));
 extern tree java_type_for_mode PARAMS ((enum machine_mode, int));
index 6a93141214464ec3ff306b261c04f07ea0370e56..7faa74cedf82422fd02dca6a234c4ae6d92400d0 100644 (file)
@@ -247,8 +247,6 @@ set_source_filename (jcf, index)
 
 #include "jcf-reader.c"
 
-static int yydebug;
-
 tree
 parse_signature (jcf, sig_index)
      JCF *jcf;
@@ -262,13 +260,6 @@ parse_signature (jcf, sig_index)
                                   JPOOL_UTF_LENGTH (jcf, sig_index));
 }
 
-void
-java_set_yydebug (value)
-     int value;
-{
-  yydebug = value;
-}
-
 tree
 get_constant (jcf, index)
   JCF *jcf;
@@ -920,7 +911,8 @@ predefined_filename_p (node)
 }
 
 void
-java_parse_file ()
+java_parse_file (set_yydebug)
+     int set_yydebug ATTRIBUTE_UNUSED;
 {
   int filename_count = 0;
   char *list, *next;
index 0f0984c3df0ee74c85e2b1f52dacf7fbe39ed0af..c699da3dd39e8664a318d422c7a395706cfe8a37 100644 (file)
@@ -223,8 +223,6 @@ static int dependency_tracking = 0;
 #define LANG_HOOKS_INIT_OPTIONS java_init_options
 #undef LANG_HOOKS_DECODE_OPTION
 #define LANG_HOOKS_DECODE_OPTION java_decode_option
-#undef LANG_HOOKS_SET_YYDEBUG
-#define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
 #undef LANG_HOOKS_PARSE_FILE
 #define LANG_HOOKS_PARSE_FILE java_parse_file
 #undef LANG_HOOKS_MARK_TREE
index 341a69abcfa59b90ffde26195319fdbdf88cd354..daf00101d7679c5e97cb73dd6e2cb2be059e90c6 100644 (file)
@@ -41,6 +41,7 @@ extern HOST_WIDE_INT hook_get_alias_set_0     PARAMS ((tree));
 
 extern void lhd_do_nothing PARAMS ((void));
 extern void lhd_do_nothing_t PARAMS ((tree));
+extern void lhd_do_nothing_i PARAMS ((int));
 extern void lhd_do_nothing_f PARAMS ((struct function *));
 extern int lhd_decode_option PARAMS ((int, char **));
 extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
@@ -52,7 +53,6 @@ extern int lhd_unsafe_for_reeval PARAMS ((tree));
 extern void lhd_clear_binding_stack PARAMS ((void));
 extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
 extern const char *lhd_decl_printable_name PARAMS ((tree, int));
-extern void lhd_set_yydebug PARAMS ((int));
 extern rtx lhd_expand_expr PARAMS ((tree, rtx, enum machine_mode, int));
 extern void lhd_print_error_function PARAMS ((struct diagnostic_context *,
                                              const char *));
@@ -82,7 +82,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
 #define LANG_HOOKS_IDENTIFIER_SIZE     sizeof (struct lang_identifier)
 #define LANG_HOOKS_INIT                        lhd_do_nothing
 #define LANG_HOOKS_FINISH              lhd_do_nothing
-#define LANG_HOOKS_PARSE_FILE          lhd_do_nothing
+#define LANG_HOOKS_PARSE_FILE          lhd_do_nothing_i
 #define LANG_HOOKS_CLEAR_BINDING_STACK lhd_clear_binding_stack
 #define LANG_HOOKS_INIT_OPTIONS                lhd_do_nothing
 #define LANG_HOOKS_DECODE_OPTION       lhd_decode_option
@@ -108,7 +108,6 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
 #define LANG_HOOKS_PRINT_IDENTIFIER    lhd_print_tree_nothing
 #define LANG_HOOKS_PRINT_ERROR_FUNCTION lhd_print_error_function
 #define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name
-#define LANG_HOOKS_SET_YYDEBUG         lhd_set_yydebug
 
 #define LANG_HOOKS_FUNCTION_INIT       lhd_do_nothing_f
 #define LANG_HOOKS_FUNCTION_FREE       lhd_do_nothing_f
@@ -250,7 +249,6 @@ int lhd_tree_dump_type_quals                        PARAMS ((tree));
   LANG_HOOKS_PRINT_IDENTIFIER, \
   LANG_HOOKS_DECL_PRINTABLE_NAME, \
   LANG_HOOKS_PRINT_ERROR_FUNCTION, \
-  LANG_HOOKS_SET_YYDEBUG, \
   LANG_HOOKS_ATTRIBUTE_TABLE, \
   LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \
   LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, \
index 0bbb5e33c80a269489355829ea25956e50997f69..4f0e2f3b34004430c6354fb44a52756abad08c2e 100644 (file)
@@ -47,6 +47,14 @@ lhd_do_nothing_t (t)
 {
 }
 
+/* Do nothing (int).  */
+
+void
+lhd_do_nothing_i (i)
+     int i ATTRIBUTE_UNUSED;
+{
+}
+
 /* Do nothing (function).  */
 
 void
@@ -140,16 +148,6 @@ lhd_warn_unused_global_decl (decl)
   return true;
 }
 
-/* Called when -dy is given on the command line.  */
-
-void
-lhd_set_yydebug (value)
-     int value;
-{
-  if (value)
-    fprintf (stderr, "warning: no yacc/bison-generated output to debug!\n");
-}
-
 /* Set the DECL_ASSEMBLER_NAME for DECL.  */
 void
 lhd_set_decl_assembler_name (decl)
index 8c0b8ef96711b0f0905fe315f26a02c41ec20256..417f77bd1b58056f6d76688cdd71d5b5808dd6d0 100644 (file)
@@ -213,8 +213,9 @@ struct lang_hooks
   /* Called at the end of compilation, as a finalizer.  */
   void (*finish) PARAMS ((void));
 
-  /* Parses the entire file.  */
-  void (*parse_file) PARAMS ((void));
+  /* Parses the entire file.  The argument is non-zero to cause bison
+     parsers to dump debugging information during parsing.  */
+  void (*parse_file) PARAMS ((int));
 
   /* Called immediately after parsing to clear the binding stack.  */
   void (*clear_binding_stack) PARAMS ((void));
@@ -327,11 +328,6 @@ struct lang_hooks
   void (*print_error_function) PARAMS ((struct diagnostic_context *,
                                        const char *));
 
-  /* Set yydebug for bison-based parsers, when -dy is given on the
-     command line.  By default, if the parameter is non-zero, prints a
-     warning that the front end does not use such a parser.  */
-  void (*set_yydebug) PARAMS ((int));
-
   /* Pointers to machine-independent attribute tables, for front ends
      using attribs.c.  If one is NULL, it is ignored.  Respectively, a
      table of attributes specific to the language, a table of
index 6719e52b365387890ed015247551cf9173a23988..588d5479d9ac27f4ac276f7fa1f3ad86ae70fbac 100644 (file)
@@ -68,8 +68,6 @@ static void objc_post_options                   PARAMS ((void));
 #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
 #undef LANG_HOOKS_DECL_PRINTABLE_NAME
 #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name
-#undef LANG_HOOKS_SET_YYDEBUG
-#define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl
 
index fa8e2893a54428dd1ff78e34c8cfe3a476a41b48..07dc649fedc11b7c8555e4dff197d8bf58e1905f 100644 (file)
@@ -126,6 +126,9 @@ static int print_single_switch PARAMS ((FILE *, int, int, const char *,
 static void print_switch_values PARAMS ((FILE *, int, int, const char *,
                                       const char *, const char *));
 
+/* Nonzero to dump debug info whilst parsing (-dy option).  */
+static int set_yydebug;
+
 /* Length of line when printing switch values.  */
 #define MAX_LINE 75
 
@@ -2029,7 +2032,7 @@ compile_file ()
 
   /* Call the parser, which parses the entire file (calling
      rest_of_compilation for each function).  */
-  (*lang_hooks.parse_file) ();
+  (*lang_hooks.parse_file) (set_yydebug);
 
   /* In case there were missing block closers,
      get us back to the global binding level.  */
@@ -3721,7 +3724,7 @@ decode_d_option (arg)
        rtl_dump_and_exit = 1;
        break;
       case 'y':
-       (*lang_hooks.set_yydebug) (1);
+       set_yydebug = 1;
        break;
       case 'D':        /* These are handled by the preprocessor.  */
       case 'I':