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]

[PATCH] Java: lang_hooks initialization fix.



I'm checking this in. 

./A

2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>

        * lang.c (langhooks.h): Included.
        (LANG_HOOKS_INIT): Redefined.
        (LANG_HOOKS_INIT_OPTIONS): Likewise.
        (LANG_HOOKS_DECODE_OPTION): Likewise.
        (struct lang_hooks lang_hooks): New initialization.

Index: lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lang.c,v
retrieving revision 1.73
diff -u -p -r1.73 lang.c
--- lang.c      2001/10/07 16:51:04     1.73
+++ lang.c      2001/10/15 21:40:01
@@ -34,6 +34,7 @@ The Free Software Foundation is independ
 #include "java-tree.h"
 #include "jcf.h"
 #include "toplev.h"
+#include "langhooks.h"
 #include "flags.h"
 #include "xref.h"
 #include "ggc.h"
@@ -195,12 +196,15 @@ static int dependency_tracking = 0;
 #define DEPEND_TARGET_SET 4
 #define DEPEND_FILE_ALREADY_SET 8
 
+#undef LANG_HOOKS_INIT
+#define LANG_HOOKS_INIT java_init
+#undef LANG_HOOKS_INIT_OPTIONS
+#define LANG_HOOKS_INIT_OPTIONS java_init_options
+#undef LANG_HOOKS_DECODE_OPTION
+#define LANG_HOOKS_DECODE_OPTION java_decode_option
+
 /* Each front end provides its own.  */
-struct lang_hooks lang_hooks = {java_init,
-                               NULL, /* java_finish */
-                               java_init_options,
-                               java_decode_option,
-                               NULL /* post_options */};
+struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
 /* Process an option that can accept a `no-' form.
    Return 1 if option found, 0 otherwise.  */


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