public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mckinlay at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug java/19870] gcj -C doesn't generate accessors for private members in inner class Date: Wed, 09 Mar 2005 18:22:00 -0000 [thread overview] Message-ID: <20050309182220.1363.qmail@sourceware.org> (raw) In-Reply-To: <20050210002019.19870.mark@gcc.gnu.org> ------- Additional Comments From mckinlay at redhat dot com 2005-03-09 18:22 ------- gcj is generating code which references private members across class boundaries, which isn't legal at the class/VM level. To fix this, we need to generate package-private accessor methods when a private member is referenced from an enclosed or enclosing class. eg: jikes generates: Method name:"main" public static Signature: (java.lang.String[])void Attribute "Code", length:38, max_stack:2, max_locals:1, code_length:10 0: getstatic <Field java.lang.System.out java.io.PrintStream> 3: invokestatic <Method A$B.access$0 ()int> 6: invokevirtual <Method java.io.PrintStream.println (int)void> 9: return Attribute "LineNumberTable", length:10, count: 2 line: 10 at pc: 0 line: 11 at pc: 9 Method name:"access$0" static Signature: ()int Attribute "Synthetic", length:0 Attribute "Code", length:28, max_stack:1, max_locals:0, code_length:4 0: getstatic <Field A$B.i int> 3: ireturn Attribute "LineNumberTable", length:6, count: 1 line: 3 at pc: 0 -- What |Removed |Added ---------------------------------------------------------------------------- Summary|gcj -C compiled code |gcj -C doesn't generate |accessing private fields of |accessors for private |inner classes from outer |members in inner class |class give | |IllegalAccessError | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19870
next prev parent reply other threads:[~2005-03-09 18:22 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-02-10 3:56 [Bug java/19870] New: gcj -C compiled code accessing private fields of inner classes from outer class give IllegalAccessError mark at gcc dot gnu dot org 2005-02-10 4:05 ` [Bug java/19870] " pinskia at gcc dot gnu dot org 2005-02-10 5:36 ` pinskia at gcc dot gnu dot org 2005-02-10 6:11 ` pinskia at gcc dot gnu dot org 2005-02-10 6:16 ` pinskia at gcc dot gnu dot org 2005-03-09 18:22 ` mckinlay at redhat dot com [this message] 2005-05-19 22:57 ` [Bug java/19870] gcj -C doesn't generate accessors for private members in inner class rmathew at gcc dot gnu dot org 2005-05-23 7:46 ` [Bug java/19870] gcj -C doesn't generate accessors for private members across nested class boundaries rmathew at gcc dot gnu dot org 2005-05-25 7:04 ` rmathew at gcc dot gnu dot org 2005-05-26 8:08 ` rmathew at gcc dot gnu dot org 2005-05-27 5:15 ` cvs-commit at gcc dot gnu dot org 2005-05-27 5:39 ` cvs-commit at gcc dot gnu dot org 2005-05-27 6:04 ` rmathew at gcc dot gnu dot org 2005-06-19 3:23 ` rmathew at gcc dot gnu dot org 2005-08-14 15:51 ` rmathew at gcc dot gnu dot org 2005-08-16 18:24 ` cvs-commit at gcc dot gnu dot org 2005-08-16 18:39 ` cvs-commit at gcc dot gnu dot org 2005-08-16 18:44 ` rmathew at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050309182220.1363.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).