]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in: Update.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Fri, 9 Nov 2001 23:30:44 +0000 (23:30 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Fri, 9 Nov 2001 23:30:44 +0000 (23:30 +0000)
* Makefile.in: Update.
* c-decl.c (print_lang_decl, print_lang_type): Remove.
(print_lang_identifier): Rename c_print_identifier.
* c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(print_lang_statistics, lang_print_xnode): Remove.
* c-parse.in (set_yydebug): Rename c_set_yydebug.
* c-tree.h (c_set_yydebug, c_print_identifier): New.
* langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New.
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.h (struct lang_hooks): New members.
(lang_print_tree_hook): New.
* langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New.
* print-tree.c: Include langhooks.h.
(print_node): Update.
* toplev.c (decode_d_option): Update.
* tree.c: Include langhooks.h.
(dump_tree_statistics): Update.
* tree.h (print_lang_statistics, print_lang_decl, print_lang_type,
print_lang_identifier, set_yydebug, lang_print_xnode): Remove.
ada:
* misc.c (gnat_print_decl, gnat_print_type): Renamed.
(LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override.
(print_lang_statistics, lang_print_xnode, print_lang_identifier,
set_yydebug): Remove.
cp:
* cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
* cp-tree.h (print_class_statistics): Remove.
(cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
cxx_print_identifier, cxx_set_yydebug): New.
* lex.c (set_yydebug): Rename c_set_yydebug.
* ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
lang_print_xnode): Rename.
* tree.c (print_lang_statistics): Rename.
f:
* com.c (ffe_print_identifier): Rename.
(LANG_HOOKS_PRINT_IDENTIFIER): Override.
(lang_print_xnode, print_lang_decl, print_lang_statistics,
print_lang_type, set_yydebug): Remove.
java:
* java-tree.h (java_set_yydebug): New.
* jcf-parse.c (set_yydebug): Rename java_set_yydebug.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
(print_lang_decl, print_lang_type, print_lang_identifier,
print_lang_statistics, lang_print_xnode): Remove.
objc:
* objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER,
LANG_HOOKS_SET_YYDEBUG): Override.
(lang_print_xnode, print_lang_statistics): Remove.

From-SVN: r46907

28 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/c-decl.c
gcc/c-lang.c
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/ptree.c
gcc/cp/tree.c
gcc/f/ChangeLog
gcc/f/com.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-act.c
gcc/print-tree.c
gcc/toplev.c
gcc/tree.c
gcc/tree.h

index 4a8a99e695094e33a6bd1d52a28b620ba188f1c9..6b78f4f56e2eae18e97ab3af2e98f4846039db52 100644 (file)
@@ -1,3 +1,32 @@
+2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * Makefile.in: Update.
+       * c-decl.c (print_lang_decl, print_lang_type): Remove.
+       (print_lang_identifier): Rename c_print_identifier.
+       * c-lang.c (LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
+       (print_lang_statistics, lang_print_xnode): Remove.
+       * c-parse.in (set_yydebug): Rename c_set_yydebug.
+       * c-tree.h (c_set_yydebug, c_print_identifier): New.
+       * langhooks-def.h (lhd_print_tree_nothing, lhd_set_yydebug): New.
+       LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
+       LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
+       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): New.
+       (LANG_HOOKS_INITIALIZER): Update.
+       * langhooks.h (struct lang_hooks): New members.
+       (lang_print_tree_hook): New.
+       * langhooks.c (lhd_print_tree_nothing, lhd_set_yydebug): New.
+       * print-tree.c: Include langhooks.h.
+       (print_node): Update.
+       * toplev.c (decode_d_option): Update.
+       * tree.c: Include langhooks.h.
+       (dump_tree_statistics): Update.
+       * tree.h (print_lang_statistics, print_lang_decl, print_lang_type,
+       print_lang_identifier, set_yydebug, lang_print_xnode): Remove.
+objc:
+       * objc-act.c (LANG_HOOKS_PRINT_IDENTIFIER,
+       LANG_HOOKS_SET_YYDEBUG): Override.
+       (lang_print_xnode, print_lang_statistics): Remove.
+
 2001-11-09  Richard Henderson  <rth@redhat.com>
 
        * dwarf2asm.c (dw2_force_const_mem): Invoke STRIP_NAME_ENCODING
index f3caa0371071b1ad744c70b475b0d4d9e5e7b256..2e9d3fef9daa059a815e2c32f92aefb83916d3d3 100644 (file)
@@ -1349,12 +1349,13 @@ convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h toplev.
 langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
    tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h langhooks-def.h
 tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
-   $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H)
+   $(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h
 tree-inline.o : tree-inline.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
    expr.h flags.h params.h input.h insn-config.h $(INTEGRATE_H) \
    $(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) toplev.h langhooks.h \
    $(C_COMMON_H) tree-inline.h
-print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H)
+print-tree.o : print-tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GGC_H) \
+   langhooks.h
 stor-layout.o : stor-layout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
    function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H) $(TM_P_H)
 fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h \
index 07645b039f9a617ec661c5c8e0d8bd0aa7e03859..dafcd0ed59bbf6042cb98241231d9fa36af740a3 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * misc.c (gnat_print_decl, gnat_print_type): Renamed.
+       (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE): Override.
+       (print_lang_statistics, lang_print_xnode, print_lang_identifier,
+       set_yydebug): Remove.
+
 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * misc.c (LANG_HOOKS_NAME, LANG_HOOKS_IDENTIFIER_SIZE): Override.
index f6ad45b9f1887ea74c1bb2b1eaa21032ad0a10d6..3a3349466144adec2e47fd6e7052f91872f09b40 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                           C Implementation File                          *
  *                                                                          *
- *                             $Revision: 1.9 $
+ *                             $Revision: 1.10 $
  *                                                                          *
  *          Copyright (C) 1992-2001 Free Software Foundation, Inc.          *
  *                                                                          *
@@ -113,6 +113,8 @@ static void gnat_init                       PARAMS ((void));
 static void gnat_init_options          PARAMS ((void));
 static int gnat_decode_option          PARAMS ((int, char **));
 static HOST_WIDE_INT gnat_get_alias_set        PARAMS ((tree));
+static void gnat_print_decl            PARAMS ((FILE *, tree, int));
+static void gnat_print_type            PARAMS ((FILE *, tree, int));
 
 /* Structure giving our language-specific hooks.  */
 
@@ -130,6 +132,10 @@ static HOST_WIDE_INT gnat_get_alias_set    PARAMS ((tree));
 #define LANG_HOOKS_HONOR_READONLY      1
 #undef LANG_HOOKS_GET_ALIAS_SET
 #define LANG_HOOKS_GET_ALIAS_SET       gnat_get_alias_set
+#undef LANG_HOOKS_PRINT_DECL
+#define LANG_HOOKS_PRINT_DECL          gnat_print_decl
+#undef LANG_HOOKS_PRINT_TYPE
+#define LANG_HOOKS_PRINT_TYPE          gnat_print_type
 
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
@@ -372,20 +378,6 @@ maybe_build_cleanup (decl)
   return NULL_TREE;
 }
 
-/* Print any language-specific compilation statistics.  */
-
-void
-print_lang_statistics ()
-{}
-
-void
-lang_print_xnode (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{
-}
-
 /* integrate_decl_tree calls this function, but since we don't use the
    DECL_LANG_SPECIFIC field, this is a no-op.  */
 
@@ -397,8 +389,8 @@ copy_lang_decl (node)
 
 /* Hooks for print-tree.c:  */
 
-void
-print_lang_decl (file, node, indent)
+static void
+gnat_print_decl (file, node, indent)
      FILE *file;
      tree node;
      int indent;
@@ -420,8 +412,8 @@ print_lang_decl (file, node, indent)
     }
 }
 
-void
-print_lang_type (file, node, indent)
+static void
+gnat_print_type (file, node, indent)
      FILE *file;
      tree node;
      int indent;
@@ -472,13 +464,6 @@ print_lang_type (file, node, indent)
     }
 }
 
-void
-print_lang_identifier (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{}
-
 /* Expands GNAT-specific GCC tree nodes.  The only ones we support
    here are TRANSFORM_EXPR, UNCHECKED_CONVERT_EXPR, ALLOCATE_EXPR,
    USE_EXPR and NULL_EXPR.  */
@@ -900,14 +885,6 @@ finish_parse ()
 {
 }
 
-/* Sets some debug flags for the parsed. It does nothing here.  */
-
-void
-set_yydebug (value)
-     int value ATTRIBUTE_UNUSED;
-{
-}
-
 #if 0
 
 /* Return the alignment for GNAT_TYPE.  */
index 0440bba5657171ecaa557e779f395610aa57af9e..8f8edf4e98c3f9da6585693ce52ab018e9b93103 100644 (file)
@@ -789,26 +789,8 @@ c_decode_option (argc, argv)
   return 1;
 }
 
-/* Hooks for print_node.  */
-
-void
-print_lang_decl (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{
-}
-
-void
-print_lang_type (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{
-}
-
 void
-print_lang_identifier (file, node, indent)
+c_print_identifier (file, node, indent)
      FILE *file;
      tree node;
      int indent;
index b3d9094b8d4b045f3b7e388642a111d18c373ffe..67c860b790025f4f1fac0cd4f3b362cd073fe2fa 100644 (file)
@@ -61,6 +61,10 @@ static int c_cannot_inline_tree_fn PARAMS ((tree *));
 #define LANG_HOOKS_POST_OPTIONS c_post_options
 #undef LANG_HOOKS_GET_ALIAS_SET
 #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
+#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_TREE_INLINING_CANNOT_INLINE_TREE_FN
 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
@@ -134,21 +138,6 @@ c_init ()
   c_parse_init ();
 }
 
-void
-print_lang_statistics ()
-{
-}
-
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{
-}
-
 /* Used by c-lex.c, but only for objc.  */
 
 tree
index f458e03cb3a82adce4cf196c13ebf801b248a7bd..41208c313eb38d02f2df12af9ee178fd5c02a9f8 100644 (file)
@@ -3784,7 +3784,7 @@ yylex()
    in order to build the compiler.  */
 
 void
-set_yydebug (value)
+c_set_yydebug (value)
      int value;
 {
 #if YYDEBUG != 0
index 91d98b74dff850941092084804492b64ebf3e970..acde94ec2c50149539aa56d98dd29a38320cc7db 100644 (file)
@@ -155,12 +155,14 @@ 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));
 extern int yyparse_1                           PARAMS ((void));
 
 /* in c-aux-info.c */
 extern void gen_aux_info_record                 PARAMS ((tree, int, int, int));
 
 /* in c-decl.c */
+extern void c_print_identifier                 PARAMS ((FILE *, tree, int));
 extern tree build_array_declarator              PARAMS ((tree, tree, int, int));
 extern tree build_enumerator                    PARAMS ((tree, tree));
 
index a98e62b2c6f7a87de3e74f29ab40caf4af255eea..78588d77c936886b9b948f5b271f4bfaa220b146 100644 (file)
@@ -1,3 +1,16 @@
+2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
+       LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
+       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
+       * cp-tree.h (print_class_statistics): Remove.
+       (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
+       cxx_print_identifier, cxx_set_yydebug): New.
+       * lex.c (set_yydebug): Rename c_set_yydebug.
+       * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
+       lang_print_xnode): Rename.
+       * tree.c (print_lang_statistics): Rename.
+
 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * class.c (dump_array): Fix format specifier warning.
index cd951da0596a64209ccebd18b2324c35640b1e51..08ecf5bccf96ac6b21acf72d072e785a2eb08262 100644 (file)
@@ -45,6 +45,18 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
 #define LANG_HOOKS_POST_OPTIONS cxx_post_options
 #undef LANG_HOOKS_GET_ALIAS_SET
 #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
+#undef LANG_HOOKS_PRINT_STATISTICS
+#define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
+#undef LANG_HOOKS_PRINT_XNODE
+#define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
+#undef LANG_HOOKS_PRINT_DECL
+#define LANG_HOOKS_PRINT_DECL cxx_print_decl
+#undef LANG_HOOKS_PRINT_TYPE
+#define LANG_HOOKS_PRINT_TYPE cxx_print_type
+#undef LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
+#undef LANG_HOOKS_SET_YYDEBUG
+#define LANG_HOOKS_SET_YYDEBUG cxx_set_yydebug
 
 #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
index f58e21547cbe657ba68c2d65a8f231cbb1c23244..d4f334189ef87e0dfe74f8330ee2478ef4a01116 100644 (file)
@@ -3530,7 +3530,12 @@ extern int current_lang_depth                    PARAMS ((void));
 extern void push_lang_context                  PARAMS ((tree));
 extern void pop_lang_context                   PARAMS ((void));
 extern tree instantiate_type                   PARAMS ((tree, tree, enum instantiate_type_flags));
-extern void print_class_statistics             PARAMS ((void));
+extern void cxx_print_statistics               PARAMS ((void));
+extern void cxx_print_xnode                    PARAMS ((FILE *, tree, int));
+extern void cxx_print_decl                     PARAMS ((FILE *, tree, int));
+extern void cxx_print_type                     PARAMS ((FILE *, tree, int));
+extern void cxx_print_identifier               PARAMS ((FILE *, tree, int));
+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 00765867ce18739c5fc6cc9cf778bb5778bfd8c9..f5fdc0f3db4307dc1142b7f81e9c2361fcee570c 100644 (file)
@@ -907,7 +907,7 @@ print_parse_statistics ()
    in order to build the compiler.  */
 
 void
-set_yydebug (value)
+cxx_set_yydebug (value)
      int value;
 {
 #if YYDEBUG != 0
index 8f2f577cc61e4afb586f1d00a1d7ef4bb9c1e5bf..f40e412726cbfd0378a1baef86eb10ba7fd5fa0d 100644 (file)
@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA.  */
 #include "cp-tree.h"
 
 void
-print_lang_decl (file, node, indent)
+cxx_print_decl (file, node, indent)
      FILE *file;
      tree node;
      int indent;
@@ -66,7 +66,7 @@ print_lang_decl (file, node, indent)
 }
 
 void
-print_lang_type (file, node, indent)
+cxx_print_type (file, node, indent)
      FILE *file;
      register tree node;
      int indent;
@@ -158,7 +158,7 @@ print_lang_type (file, node, indent)
 }
 
 void
-print_lang_identifier (file, node, indent)
+cxx_print_identifier (file, node, indent)
      FILE *file;
      tree node;
      int indent;
@@ -173,7 +173,7 @@ print_lang_identifier (file, node, indent)
 }
 
 void
-lang_print_xnode (file, node, indent)
+cxx_print_xnode (file, node, indent)
      FILE *file;
      tree node;
      int indent;
index 23c5ce85e622b51cd7b44101a6ab269de0732f60..97ae23154a9ce6b579474d219f065722023e0aa2 100644 (file)
@@ -1276,7 +1276,7 @@ extern int depth_reached;
 #endif
 
 void
-print_lang_statistics ()
+cxx_print_statistics ()
 {
   print_search_statistics ();
   print_class_statistics ();
index 1682f3ea8eaaf0e5029e45a682bd0ea340502fb1..d1b4d7578c7f41ba94ab8921fa387a6e37df9ce9 100644 (file)
@@ -1,3 +1,10 @@
+Fri Nov  9 23:16:45 2001  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * com.c (ffe_print_identifier): Rename.
+       (LANG_HOOKS_PRINT_IDENTIFIER): Override.
+       (lang_print_xnode, print_lang_decl, print_lang_statistics,
+       print_lang_type, set_yydebug): Remove.
+
 2001-11-09  Zack Weinberg  <zack@codesourcery.com>
 
        * g77spec.c (lang_specific_driver): Adjust behavior of -v and
index 79eadefe0de245824434ffdcca2be4025a7fda5a..ae4201dbdaf3fdb7574e93628d3170f828555986 100644 (file)
@@ -14256,6 +14256,7 @@ insert_block (block)
 static void ffe_init PARAMS ((void));
 static void ffe_finish PARAMS ((void));
 static void ffe_init_options PARAMS ((void));
+static void ffe_print_identifier PARAMS ((FILE *, tree, int));
 
 #undef  LANG_HOOKS_NAME
 #define LANG_HOOKS_NAME                        "GNU F77"
@@ -14267,6 +14268,8 @@ static void ffe_init_options PARAMS ((void));
 #define LANG_HOOKS_INIT_OPTIONS                ffe_init_options
 #undef  LANG_HOOKS_DECODE_OPTION
 #define LANG_HOOKS_DECODE_OPTION       ffe_decode_option
+#undef  LANG_HOOKS_PRINT_IDENTIFIER
+#define LANG_HOOKS_PRINT_IDENTIFIER    ffe_print_identifier
 
 /* We do not wish to use alias-set based aliasing at all.  Used in the
    extreme (every object with its own set, with equivalences recorded) it
@@ -14278,16 +14281,6 @@ static void ffe_init_options PARAMS ((void));
 
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
-     FILE *file UNUSED;
-     tree node UNUSED;
-     int indent UNUSED;
-{
-}
-
 static void
 ffe_finish ()
 {
@@ -14542,16 +14535,8 @@ poplevel (keep, reverse, functionbody)
   return block;
 }
 
-void
-print_lang_decl (file, node, indent)
-     FILE *file UNUSED;
-     tree node UNUSED;
-     int indent UNUSED;
-{
-}
-
-void
-print_lang_identifier (file, node, indent)
+static void
+ffe_print_identifier (file, node, indent)
      FILE *file;
      tree node;
      int indent;
@@ -14560,19 +14545,6 @@ print_lang_identifier (file, node, indent)
   print_node (file, "local", IDENTIFIER_LOCAL_VALUE (node), indent + 4);
 }
 
-void
-print_lang_statistics ()
-{
-}
-
-void
-print_lang_type (file, node, indent)
-     FILE *file UNUSED;
-     tree node UNUSED;
-     int indent UNUSED;
-{
-}
-
 /* Record a decl-node X as belonging to the current lexical scope.
    Check for errors (such as an incompatible declaration for the same
    name already seen in the same scope).
@@ -14762,18 +14734,6 @@ set_block (block)
                                           BLOCK_SUBBLOCKS (block));
 }
 
-/* ~~gcc/tree.h *should* declare this, because toplev.c references it.  */
-
-/* Can't 'yydebug' a front end not generated by yacc/bison!  */
-
-void
-set_yydebug (value)
-     int value;
-{
-  if (value)
-    fprintf (stderr, "warning: no yacc/bison-generated output to debug!\n");
-}
-
 tree
 signed_or_unsigned_type (unsignedp, type)
      int unsignedp;
index 284665932edb834afea855fe6ff376093af5edf3..158852165b58c8cafa57ea3b96117c0556874034 100644 (file)
@@ -1,3 +1,11 @@
+2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * java-tree.h (java_set_yydebug): New.
+       * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
+       * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
+       (print_lang_decl, print_lang_type, print_lang_identifier,
+       print_lang_statistics, lang_print_xnode): Remove.
+
 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * jcf-parse.c (init_lex): Remove.
index 132cd719730bb0c5d0d27738115c5c6752b1be1a..d9417b43dcc60763838f16cf7395bbe479d78bd8 100644 (file)
@@ -996,6 +996,7 @@ struct lang_type
 #define JCF_u4 unsigned long
 #define JCF_u2 unsigned short
 
+extern void java_set_yydebug PARAMS ((int));
 extern void add_assume_compiled PARAMS ((const char *, int));
 extern tree lookup_class PARAMS ((tree));
 extern tree lookup_java_constructor PARAMS ((tree, tree));
index 6190cf358e581725dd168ce0508934854cae68f3..ec76e81ae12f312eab3f772be01f2346baea977b 100644 (file)
@@ -262,7 +262,7 @@ parse_signature (jcf, sig_index)
 }
 
 void
-set_yydebug (value)
+java_set_yydebug (value)
      int value;
 {
   yydebug = value;
index feeb89ae0d77d72135e4dafc2bc2b7e067764a8c..9ba18490a78575864bc46cf384a2f1874137cc82 100644 (file)
@@ -203,6 +203,8 @@ 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
 
 /* Each front end provides its own.  */
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -741,44 +743,3 @@ java_init_options ()
   flag_exceptions = 1;
   flag_non_call_exceptions = 1;
 }
-
-/* Hooks for print_node.  */
-
-void
-print_lang_decl (file, node, indent)
-     FILE *file __attribute ((__unused__));
-     tree node __attribute ((__unused__));
-     int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_type (file, node, indent)
-     FILE *file __attribute ((__unused__));
-     tree node __attribute ((__unused__));
-     int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_identifier (file, node, indent)
-     FILE *file __attribute ((__unused__));
-     tree node __attribute ((__unused__));
-     int indent __attribute ((__unused__));
-{
-}
-
-void
-print_lang_statistics ()
-{
-}
-
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
-     FILE *file __attribute ((__unused__));
-     tree node __attribute ((__unused__));
-     int indent __attribute ((__unused__));
-{
-}
index 340efddf680351b24be52e090ef33d5ad51f8a12..ef767511f23d090c4c96654ad7b5959987bae199 100644 (file)
@@ -41,6 +41,8 @@ extern void lhd_do_nothing PARAMS ((void));
 extern int lhd_decode_option PARAMS ((int, char **));
 extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
 extern void lhd_clear_binding_stack PARAMS ((void));
+extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
+extern void lhd_set_yydebug PARAMS ((int));
 
 /* Declarations of default tree inlining hooks.  */
 tree lhd_tree_inlining_walk_subtrees           PARAMS ((tree *, int *,
@@ -66,6 +68,12 @@ int lhd_tree_inlining_anon_aggr_type_p               PARAMS ((tree));
 #define LANG_HOOKS_POST_OPTIONS                lhd_do_nothing
 #define LANG_HOOKS_GET_ALIAS_SET       lhd_get_alias_set
 #define LANG_HOOKS_HONOR_READONLY      false
+#define LANG_HOOKS_PRINT_STATISTICS    lhd_do_nothing
+#define LANG_HOOKS_PRINT_XNODE         lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_DECL          lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_TYPE          lhd_print_tree_nothing
+#define LANG_HOOKS_PRINT_IDENTIFIER    lhd_print_tree_nothing
+#define LANG_HOOKS_SET_YYDEBUG         lhd_set_yydebug
 
 /* Tree inlining hooks.  */
 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
@@ -107,6 +115,12 @@ int lhd_tree_inlining_anon_aggr_type_p             PARAMS ((tree));
   LANG_HOOKS_POST_OPTIONS, \
   LANG_HOOKS_GET_ALIAS_SET, \
   LANG_HOOKS_HONOR_READONLY, \
+  LANG_HOOKS_PRINT_STATISTICS, \
+  LANG_HOOKS_PRINT_XNODE, \
+  LANG_HOOKS_PRINT_DECL, \
+  LANG_HOOKS_PRINT_TYPE, \
+  LANG_HOOKS_PRINT_IDENTIFIER, \
+  LANG_HOOKS_SET_YYDEBUG, \
   LANG_HOOKS_TREE_INLINING_INITIALIZER \
 }
 
index a253af372a2c226ddfcaa1c413d1f5801123a009..f2b982121f87467d220f8d3fb79d9f59355633c0 100644 (file)
@@ -47,6 +47,26 @@ lhd_decode_option (argc, argv)
   return 0;
 }
 
+/* Called from by print-tree.c.  */
+
+void
+lhd_print_tree_nothing (file, node, indent)
+     FILE *file ATTRIBUTE_UNUSED;
+     tree node ATTRIBUTE_UNUSED;
+     int indent ATTRIBUTE_UNUSED;
+{
+}
+
+/* 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");
+}
+
 /* Provide a default routine to clear the binding stack.  This is used
    by languages that don't need to do anything special.  */
 void
index 5254afb1f99585aeb140aff8499a46787e07552c..466b7ae479ff9ddf3f474906ab84e18ffb9c4b1c 100644 (file)
@@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA.  */
 #ifndef GCC_LANG_HOOKS_H
 #define GCC_LANG_HOOKS_H
 
+/* A print hook for print_tree ().  */
+typedef void (*lang_print_tree_hook) PARAMS ((FILE *, tree, int indent));
+
 /* The following hooks are documented in langhooks.c.  Must not be
    NULL.  */
 
@@ -88,6 +91,25 @@ struct lang_hooks
   /* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored.  */
   bool honor_readonly;
 
+  /* The front end can add its own statistics to -fmem-report with
+     this hook.  It should output to stderr.  */
+  void (*print_statistics) PARAMS ((void));
+
+  /* Called by print_tree when there is a tree of class 'x' that it
+     doesn't know how to display.  */
+  lang_print_tree_hook print_xnode;
+
+  /* Called to print language-dependent parts of a class 'd', class
+     't', and IDENTIFIER_NODE nodes.  */
+  lang_print_tree_hook print_decl;
+  lang_print_tree_hook print_type;
+  lang_print_tree_hook print_identifier;
+
+  /* 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));
+
   struct lang_hooks_for_tree_inlining tree_inlining;
 
   /* Whenever you add entries here, make sure you adjust langhooks.h
index a4cbcdb273dccdee6cd75e700d66eb72b5558900..fa2842eda6e96525f3268016cc7352fa52ab3c7c 100644 (file)
@@ -461,6 +461,10 @@ static int print_struct_values = 0;
 #define LANG_HOOKS_DECODE_OPTION objc_decode_option
 #undef LANG_HOOKS_POST_OPTIONS
 #define LANG_HOOKS_POST_OPTIONS objc_post_options
+#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
 
 /* Each front end provides its own.  */
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -640,16 +644,6 @@ objc_decode_option (argc, argv)
   return 1;
 }
 
-/* used by print-tree.c */
-
-void
-lang_print_xnode (file, node, indent)
-     FILE *file ATTRIBUTE_UNUSED;
-     tree node ATTRIBUTE_UNUSED;
-     int indent ATTRIBUTE_UNUSED;
-{
-}
-
 \f
 static tree
 define_decl (declarator, declspecs)
@@ -8333,11 +8327,6 @@ handle_impent (impent)
   assemble_zeros (UNITS_PER_WORD);
 }
 \f
-void
-print_lang_statistics ()
-{
-}
-
 static void
 ggc_mark_imp_list (arg)
     void *arg;
index f4476ba2d47ec52f4ac9c8f2f0732f3c52af01a4..51fad169609bc05ff8e081bee83045607b8163bf 100644 (file)
@@ -24,6 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "system.h"
 #include "tree.h"
 #include "ggc.h"
+#include "langhooks.h"
 
 /* Define the hash table of nodes already seen.
    Such nodes are not repeated; brief cross-references are used.  */
@@ -442,7 +443,7 @@ print_node (file, prefix, node, indent)
       print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
       print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
 
-      print_lang_decl (file, node, indent);
+      (*lang_hooks.print_decl) (file, node, indent);
 
       if (DECL_RTL_SET_P (node))
        {
@@ -574,7 +575,7 @@ print_node (file, prefix, node, indent)
       if (TYPE_CONTEXT (node))
        print_node_brief (file, "context", TYPE_CONTEXT (node), indent + 4);
 
-      print_lang_type (file, node, indent);
+      (*lang_hooks.print_type) (file, node, indent);
 
       if (TYPE_POINTER_TO (node) || TREE_CHAIN (node))
        indent_to (file, indent + 3);
@@ -719,7 +720,7 @@ print_node (file, prefix, node, indent)
          break;
 
        case IDENTIFIER_NODE:
-         print_lang_identifier (file, node, indent);
+         (*lang_hooks.print_identifier) (file, node, indent);
          break;
 
        case TREE_LIST:
@@ -742,7 +743,7 @@ print_node (file, prefix, node, indent)
 
        default:
          if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
-           lang_print_xnode (file, node, indent);
+           (*lang_hooks.print_xnode) (file, node, indent);
          break;
        }
 
index f6473e119189046b09155f6996edfbd5e105c9f3..a542f430a8a7381ebd0b70cc26f9e6cc5ad25641 100644 (file)
@@ -4045,7 +4045,7 @@ decode_d_option (arg)
        rtl_dump_and_exit = 1;
        break;
       case 'y':
-       set_yydebug (1);
+       (*lang_hooks.set_yydebug) (1);
        break;
       case 'D':        /* These are handled by the preprocessor.  */
       case 'I':
index aec124221233af9295e26a20ed6b5479afbde977..1b6dc79e857fe055dbc04c19bf916a934cabc1bd 100644 (file)
@@ -45,6 +45,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "hashtab.h"
 #include "output.h"
 #include "target.h"
+#include "langhooks.h"
 
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
@@ -4424,7 +4425,7 @@ dump_tree_statistics ()
 #endif
   print_obstack_statistics ("permanent_obstack", &permanent_obstack);
   print_type_hash_statistics ();
-  print_lang_statistics ();
+  (*lang_hooks.print_statistics) ();
 }
 \f
 #define FILE_FUNCTION_PREFIX_LEN 9
index c974cd56f8b92b11206bbd6959a496965e0e30b5..45ce33f1b71d3d27a09c73f34f660ef7ab04abc8 100644 (file)
@@ -2956,13 +2956,7 @@ extern int lang_attribute_common;
 
 extern int mark_addressable            PARAMS ((tree));
 extern void incomplete_type_error      PARAMS ((tree, tree));
-extern void print_lang_statistics      PARAMS ((void));
 extern tree truthvalue_conversion      PARAMS ((tree));
-#ifdef BUFSIZ
-extern void print_lang_decl            PARAMS ((FILE *, tree, int));
-extern void print_lang_type            PARAMS ((FILE *, tree, int));
-extern void print_lang_identifier      PARAMS ((FILE *, tree, int));
-#endif
 extern int global_bindings_p           PARAMS ((void));
 extern void insert_block               PARAMS ((tree));
 
@@ -2972,9 +2966,6 @@ extern void set_decl_abstract_flags       PARAMS ((tree, int));
 extern void output_inline_function     PARAMS ((tree));
 extern void set_decl_origin_self       PARAMS ((tree));
 
-/* In front end.  */
-extern void set_yydebug                        PARAMS ((int));
-
 /* In stor-layout.c */
 extern void fixup_signed_type          PARAMS ((tree));
 extern void internal_reference_types   PARAMS ((void));
@@ -3022,10 +3013,6 @@ extern tree case_index_expr_type PARAMS ((void));
 extern HOST_WIDE_INT all_cases_count   PARAMS ((tree, int *));
 extern void check_for_full_enumeration_handling PARAMS ((tree));
 extern void declare_nonlocal_label     PARAMS ((tree));
-#ifdef BUFSIZ
-extern void lang_print_xnode           PARAMS ((FILE *, tree, int));
-#endif
-
 
 /* If KIND=='I', return a suitable global initializer (constructor) name.
    If KIND=='D', return a suitable global clean-up (destructor) name.  */