diff options
author | Tom Tromey <tromey@redhat.com> | 2004-12-06 15:32:38 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-12-06 15:32:38 +0000 |
commit | a58d74533c0b06903094936b4d3ba3712fe10ca9 (patch) | |
tree | c828f6f61d900bf37c9c5909e2bd3852aef32c0a /gcc/java/parse.y | |
parent | 0bc371d376f3fe74f0be50edd9d7b1dc82d22598 (diff) | |
download | gcc-a58d74533c0b06903094936b4d3ba3712fe10ca9.zip gcc-a58d74533c0b06903094936b4d3ba3712fe10ca9.tar.gz gcc-a58d74533c0b06903094936b4d3ba3712fe10ca9.tar.bz2 |
re PR java/14853 (Assignment to final field permitted when compiling to native)
PR java/14853:
* java-tree.h (extract_field_decl): Declare.
* parse.y (extract_field_decl): Renamed from
strip_out_static_field_access_decl. No longer static.
* check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
From-SVN: r91778
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 2634de9..815b51e 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -277,7 +277,6 @@ static tree maybe_build_array_element_wfl (tree); static int array_constructor_check_entry (tree, tree); static const char *purify_type_name (const char *); static tree fold_constant_for_init (tree, tree); -static tree strip_out_static_field_access_decl (tree); static jdeplist *reverse_jdep_list (struct parser_ctxt *); static void static_ref_err (tree, tree, tree); static void parser_add_interface (tree, tree, tree); @@ -9678,12 +9677,12 @@ resolve_field_access (tree qual_wfl, tree *field_decl, tree *field_type) return field_ref; } -/* If NODE is an access to f static field, strip out the class +/* If NODE is an access to a static field, strip out the class initialization part and return the field decl, otherwise, return NODE. */ -static tree -strip_out_static_field_access_decl (tree node) +tree +extract_field_decl (tree node) { if (TREE_CODE (node) == COMPOUND_EXPR) { @@ -14260,7 +14259,7 @@ patch_unaryop (tree node, tree wfl_op) case PREINCREMENT_EXPR: /* 15.14.2 Prefix Decrement Operator -- */ case PREDECREMENT_EXPR: - op = decl = strip_out_static_field_access_decl (op); + op = decl = extract_field_decl (op); outer_field_flag = outer_field_expanded_access_p (op, NULL, NULL, NULL); /* We might be trying to change an outer field accessed using access method. */ |