From 6fd876ac867d5564d80f1de715a147a1fc8a2a4e Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 26 Jul 2004 11:15:09 +0000 Subject: [PATCH] parse.y (build_super_invocation): Adjust declaration order to avoid declaration after statement. * parse.y (build_super_invocation): Adjust declaration order to avoid declaration after statement. From-SVN: r85189 --- gcc/java/ChangeLog | 5 +++++ gcc/java/parse.y | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index bb5aaa5b811..8962a64baaf 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-07-26 + + * parse.y (build_super_invocation): Adjust declaration order to + avoid declaration after statement. + 2004-07-25 Bernardo Innocenti * decl.c: Rename all identifiers named `class' to `cl'. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 63dbf051ef6..94b74e38fc1 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)))