diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 3b56a3a30edf..4afcc9434321 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2003-01-30 Tom Tromey + + * jcf-parse.c (read_class): Update identifier's class value if it + changed during parsing. + 2003-01-30 Loren James Rittle * Make-lang.in (po-generated): Find the targets in $(parsedir). diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 2f03202d5dd3..20dc3ff9208e 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -516,6 +516,10 @@ read_class (tree name) read_zip_member(current_jcf, current_jcf->zipd, current_jcf->zipd->zipf); jcf_parse (current_jcf); + /* Parsing might change the class, in which case we have to + put it back where we found it. */ + if (current_class != class && icv != NULL_TREE) + TREE_TYPE (icv) = current_class; class = current_class; java_pop_parser_context (0); java_parser_context_restore_global ();