aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@redhat.com>2001-06-27 13:38:20 -0700
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>2001-06-27 13:38:20 -0700
commit4a70e37e7541cfcdfa7b96df83ed1ef54787133b (patch)
treeb08bb204fb5c50109b30f6039c008d246dbb6174 /gcc/java/parse.y
parentaf27aff6ae1dbbe73ecf2b24dac6b0b1587413b5 (diff)
downloadgcc-4a70e37e7541cfcdfa7b96df83ed1ef54787133b.zip
gcc-4a70e37e7541cfcdfa7b96df83ed1ef54787133b.tar.gz
gcc-4a70e37e7541cfcdfa7b96df83ed1ef54787133b.tar.bz2
class.c (set_super_info): Call `set_class_decl_access_flags.'
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 ) From-SVN: r43618
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 37b5f1d..a56c8fc 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 =