From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11132 invoked by alias); 9 Mar 2006 10:14:46 -0000 Received: (qmail 11113 invoked by uid 48); 9 Mar 2006 10:14:45 -0000 Date: Thu, 09 Mar 2006 10:14:00 -0000 Subject: [Bug java/26617] New: A class from an unnamed package is visible to classes in named packages X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "rmathew at gcc dot gnu dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q1/txt/msg00353.txt.bz2 List-Id: GCJ allows classes in named packages to see classes in unnamed packages. For example: ---- ./Snafu.java ---- public class Snafu { } ---------------------- ---- ./foo/Bar.java ---- package foo; // import Snafu; public class Bar { Snafu junk; } ------------------------ Note that GCJ accepts the code in "foo/Bar.java" with or without the line commenting out the import declaration. Both Jikes 1.22 and Sun's JDK 1.5.0_05 reject this code. -- Summary: A class from an unnamed package is visible to classes in named packages Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rmathew at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26617