diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-28 20:53:47 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-28 20:53:47 +0000 |
| commit | 5b77dfe298130ad41b07e281cbddc87e8ee68904 (patch) | |
| tree | ff933323332bdbed9ede2133d881c80430e36a4c /gcc | |
| parent | 995f314903eddd4b5f753e30d1c0d132da90a378 (diff) | |
| download | ppe42-gcc-5b77dfe298130ad41b07e281cbddc87e8ee68904.tar.gz ppe42-gcc-5b77dfe298130ad41b07e281cbddc87e8ee68904.zip | |
PR java/9695:
* class.c (maybe_layout_super_class): Always pass a WFL to
do_resolve_class.
* parse.y (do_resolve_class): Updated comment to explain
parameters.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
| -rw-r--r-- | gcc/java/class.c | 13 | ||||
| -rw-r--r-- | gcc/java/parse.y | 10 |
3 files changed, 25 insertions, 6 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index fd4a37be83a..17ab8447943 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2003-02-28 Tom Tromey <tromey@redhat.com> + + PR java/9695: + * class.c (maybe_layout_super_class): Always pass a WFL to + do_resolve_class. + * parse.y (do_resolve_class): Updated comment to explain + parameters. + 2003-02-26 Tom Tromey <tromey@redhat.com> * jcf-write.c (generate_classfile): Check whether class is diff --git a/gcc/java/class.c b/gcc/java/class.c index a58f604da35..f121f0e95c5 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1726,8 +1726,19 @@ maybe_layout_super_class (tree super_class, tree this_class) super_class = TREE_TYPE (super_class); else { + /* do_resolve_class expects an EXPR_WITH_FILE_LOCATION, so + we give it one. */ + tree this_wrap = NULL_TREE; + + if (this_class) + { + tree this_decl = TYPE_NAME (this_class); + this_wrap = build_expr_wfl (this_class, + DECL_SOURCE_FILE (this_decl), + DECL_SOURCE_LINE (this_decl), 0); + } super_class = do_resolve_class (NULL_TREE, /* FIXME? */ - super_class, NULL_TREE, this_class); + super_class, NULL_TREE, this_wrap); if (!super_class) return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */ super_class = TREE_TYPE (super_class); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 6745cec95ba..dd05c1a98c1 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -5678,11 +5678,11 @@ resolve_class (tree enclosing, tree class_type, tree decl, tree cl) return resolved_type_decl; } -/* Effectively perform the resolution of class CLASS_TYPE. DECL or CL - are used to report error messages. Do not try to replace TYPE_NAME - (class_type) by a variable, since it is changed by - find_in_imports{_on_demand} and (but it doesn't really matter) - qualify_and_find. */ +/* Effectively perform the resolution of class CLASS_TYPE. DECL or CL + are used to report error messages; CL must either be NULL_TREE or a + WFL wrapping a class. Do not try to replace TYPE_NAME (class_type) + by a variable, since it is changed by find_in_imports{_on_demand} + and (but it doesn't really matter) qualify_and_find. */ tree do_resolve_class (tree enclosing, tree class_type, tree decl, tree cl) |

