Bug 19470 - allows obj.new TopLevel() although it is not an inner class
allows obj.new TopLevel() although it is not an inner class
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: java
4.0.0
: P2 minor
: 4.3.0
Assigned To: Not yet assigned to anyone
: accepts-invalid
Depends on: 28067
Blocks: 13607 18131
  Show dependency treegraph
 
Reported: 2005-01-16 17:49 UTC by Kalle Olavi Niemitalo
Modified: 2007-01-09 20:46 UTC (History)
2 users (show)

See Also:
Host: i386-pc-linux-gnu
Target: i386-pc-linux-gnu
Build: i386-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-05-03 18:01:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalle Olavi Niemitalo 2005-01-16 17:49:57 UTC
A GCC checked out from CVS on 2005-01-03 compiles the following code
without complaint.  Jikes and Kaffe reject the source, saying that
java.lang.Object$TopLevel (or java.lang.Object.TopLevel) is not found.

class TopLevel {
    static void fn(Object obj) {
        obj.new TopLevel();
        java.lang.Object.new TopLevel();
    }
}

$ gcj -v -C TopLevel.java
Using built-in specs.
Configured with: /home/kalle/src/FOREIGN-CVS/gcc/configure --prefix=/home/kalle
--exec-prefix=/home/kalle/i386-pc-linux-gnu --host=i386-pc-linux-gnu
--build=i386-pc-linux-gnu
Thread model: posix
gcc version 4.0.0 20050103 (experimental)

/home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../libexec/gcc/i386-pc-linux-gnu/4.0.0/jc1 TopLevel.java -quiet -dumpbase TopLevel.java -auxbase-strip NONE -g1
-version -fsyntax-only -femit-class-files -o /dev/null
GNU Java version 4.0.0 20050103 (experimental) (i386-pc-linux-gnu)
	compiled by GNU C version 4.0.0 20041023 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Class path starts here:
    ./
   
/home/kalle/stow/gcc/i386-pc-linux-gnu/bin/../lib/gcc/../../../share/java/libgcj-4.0.0.jar/ (system) (zip)

Strangely, if I remove the "java.lang." part, then GCC does report an
error.
Comment 1 Andrew Pinski 2005-01-16 18:00:26 UTC
Confirmed.
Comment 2 Tom Tromey 2007-01-09 20:46:52 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.