From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 755 invoked by alias); 21 May 2003 03:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 711 invoked by uid 71); 21 May 2003 03:46:01 -0000 Resent-Date: 21 May 2003 03:46:01 -0000 Resent-Message-ID: <20030521034601.710.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, jbrandmeyer@users.sourceforge.net Received: (qmail 14516 invoked by uid 48); 21 May 2003 03:37:31 -0000 Message-Id: <20030521033731.14515.qmail@sources.redhat.com> Date: Wed, 21 May 2003 03:46:00 -0000 From: jbrandmeyer@users.sourceforge.net Reply-To: jbrandmeyer@users.sourceforge.net To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: java/10894: Valid import statements are rejected. X-SW-Source: 2003-05/txt/msg02228.txt.bz2 List-Id: >Number: 10894 >Category: java >Synopsis: Valid import statements are rejected. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed May 21 03:46:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Jonathan Brandmeyer >Release: 3.3 >Organization: >Environment: Debian Sid, x86: Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/specs Reading specs from /usr/lib/gcc-lib/i386-linux/3.3/../../../libgcj.spec rename spec lib to liborig Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i386-linux Thread model: posix gcc version 3.3 (Debian) >Description: The following code fails to compile, but is valid according to the public Sun Java specs, section 7.5.2 as found at http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html "import java.lang.Math.*" in any compilation unit fails with this output: /usr/lib/gcc-lib/i386-linux/3.3/jc1 Test.java -quiet -dumpbase Test.java -auxbase-strip NONE -g1 -version -fsyntax-only -femit-class-files -o /dev/null GNU Java version 3.3 (Debian) (i386-linux) compiled by GNU C version 3.3 (Debian). GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48342 Class path starts here: ./ /usr/share/java/repository/ /usr/share/java/libgcj-3.3.jar/ (system) (zip) Test.java:1: error: Can't find default package `java.lang.Math'. Check the CLASSPATH environment variable and the access to the archives 1 error >How-To-Repeat: import java.lang.Math.*; public class Test { public static void main( String[] args) { System.out.println( "this is a test"); } } Compile with "gcj -v -C Test.java" >Fix: Don't use statements of the form "import java.lang".anything. They are superfluous. >Release-Note: >Audit-Trail: >Unformatted: