public inbox for java-prs@sourceware.org help / color / mirror / Atom feed
From: "rmathew at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: java-prs@gcc.gnu.org Subject: [Bug java/15073] New: Illegal access to package-private class is allowed Date: Thu, 22 Apr 2004 14:00:00 -0000 [thread overview] Message-ID: <20040422140018.15073.rmathew@gcc.gnu.org> (raw) GCJ silently compiles an illegal access to a package-private class in another package. Here's the testcase: ------------------ Snafu.java ------------------------------- public class Snafu { public static void main( String[] args) { foo.Bar.hello( ); } } ------------------------------------------------------------- ------------------ foo/Bar.java ----------------------------- package foo; class Bar { public static void hello( ) { System.out.println( "Hello!"); } } ------------------------------------------------------------- Here's what JDK 1.4.2.03 on Linux says for this: ------------------------------------------------------------- Snafu.java:3: foo.Bar is not public in foo; cannot be accessed from outside pack age foo.Bar.hello( ); ^ Snafu.java:3: hello() in foo.Bar is not defined in a public class or interface; cannot be accessed from outside package foo.Bar.hello( ); ^ 2 errors ------------------------------------------------------------- -- Summary: Illegal access to package-private class is allowed Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rmathew at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15073
next reply other threads:[~2004-04-22 14:00 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-04-22 14:00 rmathew at gcc dot gnu dot org [this message] 2004-04-22 14:00 ` [Bug java/15073] " rmathew at gcc dot gnu dot org 2004-04-27 9:04 ` rmathew at gcc dot gnu dot org 2004-05-06 17:43 ` cvs-commit at gcc dot gnu dot org 2004-05-06 17:57 ` pinskia 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=20040422140018.15073.rmathew@gcc.gnu.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=java-prs@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).