diff options
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index bb5aaa5..8962a64 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-07-26 <hp@bitrange.com> + + * parse.y (build_super_invocation): Adjust declaration order to + avoid declaration after statement. + 2004-07-25 Bernardo Innocenti <bernie@develer.com> * decl.c: Rename all identifiers named `class' to `cl'. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 63dbf051..94b74e3 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -12317,11 +12317,13 @@ build_super_invocation (tree mdecl) else { tree super_wfl = build_wfl_node (super_identifier_node); + tree a = NULL_TREE, t; + /* This is called after parsing is done, so the parser context won't be accurate. Set location info from current_class decl. */ tree class_wfl = lookup_cl (TYPE_NAME (current_class)); EXPR_WFL_LINECOL (super_wfl) = EXPR_WFL_LINECOL (class_wfl); - tree a = NULL_TREE, t; + /* If we're dealing with an anonymous class, pass the arguments of the crafted constructor along. */ if (ANONYMOUS_CLASS_P (DECL_CONTEXT (mdecl))) |