This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: Fix for PR 4695
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Subject: Re: Java: Fix for PR 4695
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 6 Nov 2001 14:03:33 -0800 (PST)
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- References: <3BE2489C.3050901@waitaki.otago.ac.nz><opk7x41zid.fsf@fencer.cygnus.com><3BE7550D.7060002@waitaki.otago.ac.nz>
- Reply-To: apbianco at cygnus dot com
Bryce McKinlay writes:
> So, this is a different bug, which happens to be revealed by my patch ;-)
How about adding this hunk to your patch? This corrected the regression.
./A
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.323
diff -u -p -r1.323 parse.y
--- parse.y 2001/10/26 01:53:56 1.323
+++ parse.y 2001/11/06 20:30:44
@@ -10375,9 +10365,11 @@ patch_method_invocation (patch, primary,
check_deprecation (wfl, list);
/* If invoking a innerclass constructor, there are hidden parameters
- to pass */
+ to pass, unless we're within an explicit constructor invocation
+ statement (JLS 8.8.5.1) */
if (TREE_CODE (patch) == NEW_CLASS_EXPR
- && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list)))
+ && PURE_INNER_CLASS_TYPE_P (DECL_CONTEXT (list))
+ && ! ctxp->explicit_constructor_p)
{
/* And make sure we add the accessed local variables to be saved
in field aliases. */