This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: java: suppress java.lang.Object constructor
- To: Jeff Sturm <jsturm at one-point dot com>
- Subject: Re: PATCH: java: suppress java.lang.Object constructor
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Fri, 13 Jul 2001 13:46:09 -0700 (PDT)
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <Pine.LNX.4.10.10107120951120.1741-100000@mars.deadcafe.org>
- Reply-To: apbianco at cygnus dot com
Jeff Sturm writes:
> The simplest patch didn't work because dropping super() has the
> unexpected side effect of preventing calls to finit$.
It needs to because the constructor might dictate hidden finit$
args. Your patch causes a regression on my side. I'll look into it.
./A
class nested_with_ctor {
void fct(final String s, final int i)
{
class nested {
String buffer = s+i;
String getString () { return buffer; }
nested (int i) { buffer = "(int)"+i; }
nested () {}
}
nested x = new nested ();
System.out.println (x.getString ());
nested y = new nested (123);
System.out.println (y.getString ());
}
public static void main (String[] arg)
{
System.out.println ("Testing class `nested_with_ctor'...");
new nested_with_ctor ().fct ("Yikes!", 321);
}
}