diff options
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r-- | gcc/java/lang.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c index c699da3..a0f823f 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -213,6 +213,11 @@ static int dependency_tracking = 0; #define DEPEND_TARGET_SET 4 #define DEPEND_FILE_ALREADY_SET 8 +struct language_function GTY(()) +{ + int unused; +}; + #undef LANG_HOOKS_NAME #define LANG_HOOKS_NAME "GNU Java" #undef LANG_HOOKS_INIT @@ -225,8 +230,6 @@ static int dependency_tracking = 0; #define LANG_HOOKS_DECODE_OPTION java_decode_option #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE java_parse_file -#undef LANG_HOOKS_MARK_TREE -#define LANG_HOOKS_MARK_TREE java_mark_tree #undef LANG_HOOKS_MARK_ADDRESSABLE #define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable #undef LANG_HOOKS_EXPAND_EXPR @@ -694,24 +697,13 @@ lang_printable_name_wls (decl, v) /* Print on stderr the current class and method context. This function is the value of the hook print_error_function. */ +static GTY(()) tree last_error_function_context; +static GTY(()) tree last_error_function; static void java_print_error_function (context, file) diagnostic_context *context __attribute__((__unused__)); const char *file; { - static tree last_error_function_context = NULL_TREE; - static tree last_error_function = NULL; - static int initialized_p; - - /* Register LAST_ERROR_FUNCTION_CONTEXT and LAST_ERROR_FUNCTION with - the garbage collector. */ - if (!initialized_p) - { - ggc_add_tree_root (&last_error_function_context, 1); - ggc_add_tree_root (&last_error_function, 1); - initialized_p = 1; - } - /* Don't print error messages with bogus function prototypes. */ if (inhibit_error_function_printing) return; @@ -770,3 +762,5 @@ java_init_options () /* In Java floating point operations never trap. */ flag_trapping_math = 0; } + +#include "gt-java-lang.h" |