diff options
author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-27 20:38:20 +0000 |
---|---|---|
committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-06-27 20:38:20 +0000 |
commit | 728b4c294b4a884776f7a5c7ab3bc2b66c96cb6e (patch) | |
tree | b08bb204fb5c50109b30f6039c008d246dbb6174 /gcc/java/parse.y | |
parent | dd582734bb817216058741790bd85a7b19cceb06 (diff) | |
download | gcc-728b4c294b4a884776f7a5c7ab3bc2b66c96cb6e.tar.gz |
2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
* class.c (set_super_info): Call `set_class_decl_access_flags.'
(set_class_decl_access_flags): New function.
* java-tree.h (set_class_decl_access_flags): New prototype.
* jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
(parse_class_file): New local `decl_max_locals.' Take wide types
into account to compute DECL_MAX_LOCALS.
* parse.y (type_import_on_demand_declaration:): Ignore duplicate
imports on demand.
(http://gcc.gnu.org/ml/gcc-patches/2001-06/msg01718.html )
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 37b5f1d58b3..a56c8fc8b8b 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -781,8 +781,14 @@ type_import_on_demand_declaration: IMPORT_TK name DOT_TK MULT_TK SC_TK { tree name = EXPR_WFL_NODE ($2); - /* Don't import java.lang.* twice. */ - if (name != java_lang_id) + tree it; + /* Search for duplicates. */ + for (it = ctxp->import_demand_list; it; it = TREE_CHAIN (it)) + if (EXPR_WFL_NODE (TREE_PURPOSE (it)) == name) + break; + /* Don't import the same thing more than once, just ignore + duplicates (7.5.2) */ + if (! it) { read_import_dir ($2); ctxp->import_demand_list = |