This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: java: suppress java.lang.Object constructor



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);
  }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]