[Bug java/1262] Method with default access can be overridden in another package
ppohja at iki dot fi
gcc-bugzilla@gcc.gnu.org
Wed Apr 14 19:35:00 GMT 2004
------- Additional Comments From ppohja at iki dot fi 2004-04-14 19:03 -------
This bug seems to be still present in the 3.3.3:
When compiled with gcj 3.3.3, or run with gij 3.3, it
returns wrong output
--- clip ---
ppohja@noam:~/test$ gcj -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs
Reading specs from /usr/lib/gcc-lib/i486-linux/3.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 i486-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040401)
ppohja@noam:~/test$
ppohja@noam:~/test$
ppohja@noam:~/test$ ls pkg1/ pkg2/
pkg1/:
A.java
pkg2/:
B.java
ppohja@noam:~/test$
ppohja@noam:~/test$
ppohja@noam:~/test$ /usr/local/j2sdk1.4.2_02/bin/javac pkg1/A.java
ppohja@noam:~/test$ /usr/local/j2sdk1.4.2_02/bin/java pkg1.A
A.foo()
ppohja@noam:~/test$
ppohja@noam:~/test$
ppohja@noam:~/test$ gcj pkg1/A.java pkg2/B.java --main=pkg1.A -o gcj-output
ppohja@noam:~/test$ ./gcj-output
B.foo()
ppohja@noam:~/test$
ppohja@noam:~/test$ java -version
gij (GNU libgcj) version 3.3.3 (Debian 20040401)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ppohja@noam:~/test$
ppohja@noam:~/test$
ppohja@noam:~/test$ java pkg1.A
B.foo()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1262
More information about the Gcc-bugs
mailing list