public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/9866] static nested class refers to private member of outer class
       [not found] <20030226175600.9866.brian_252@yahoo.com>
@ 2003-05-25 20:56 ` pinskia@physics.uc.edu
  2003-08-03 18:30 ` [Bug libgcj/9866] " pinskia at physics dot uc dot edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia@physics.uc.edu @ 2003-05-25 20:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866


pinskia@physics.uc.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-05-25 20:48:54
               date|                            |


------- Additional Comments From pinskia@physics.uc.edu  2003-05-25 20:48 -------
still an error on the mainline ():

tin:~/src/gnu/gcctest>gcj -C PHI.java 
tin:~/src/gnu/gcctest>gij PHI
Exception in thread "main" java.lang.IllegalAccessError
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/home/gates/pinskia/linux/lib/
libgcj.so.4.0.0)
   at PHI$RH.setLocator(java.lang.String) (Unknown Source)
   at PHI.main(java.lang.String[]) (Unknown Source)
tin:~/src/gnu/gcctest>gcj -C PHI.java -g
tin:~/src/gnu/gcctest>gij PHI
Exception in thread "main" java.lang.IllegalAccessError
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/home/gates/pinskia/linux/lib/
libgcj.so.4.0.0)
   at PHI$RH.setLocator(java.lang.String) (Unknown Source)
   at PHI.main(java.lang.String[]) (Unknown Source)
tin:~/src/gnu/gcctest>javac PHI.java 
tin:~/src/gnu/gcctest>!gij
gij PHI
tin:~/src/gnu/gcctest>gcj -C PHI.java
tin:~/src/gnu/gcctest>java PHI
tin:~/src/gnu/gcctest>





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/9866] static nested class refers to private member of outer class
       [not found] <20030226175600.9866.brian_252@yahoo.com>
  2003-05-25 20:56 ` [Bug java/9866] static nested class refers to private member of outer class pinskia@physics.uc.edu
@ 2003-08-03 18:30 ` pinskia at physics dot uc dot edu
  2003-08-04  3:13 ` tromey at gcc dot gnu dot org
  2004-11-15 18:03 ` phil at mkdoc dot com
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-03 18:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|java                        |libgcj
   Last reconfirmed|2003-05-25 20:48:54         |2003-08-03 18:30:54
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-03 18:30 -------
The native compiler works but gij does not so changing component to libgcj which is 
where gij is part of.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/9866] static nested class refers to private member of outer class
       [not found] <20030226175600.9866.brian_252@yahoo.com>
  2003-05-25 20:56 ` [Bug java/9866] static nested class refers to private member of outer class pinskia@physics.uc.edu
  2003-08-03 18:30 ` [Bug libgcj/9866] " pinskia at physics dot uc dot edu
@ 2003-08-04  3:13 ` tromey at gcc dot gnu dot org
  2004-11-15 18:03 ` phil at mkdoc dot com
  3 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2003-08-04  3:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866



------- Additional Comments From tromey at gcc dot gnu dot org  2003-08-04 03:13 -------
The JDK java interpreter does accept the code gcj
generates.  However, javac generates an explicit
package-private settor method.  That is what gcj
should do as well.  So, this is probably two bugs:
one in libgcj's access checking, and another in
gcj itself.  The latter is, I believe, a duplicate.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/9866] static nested class refers to private member of outer class
       [not found] <20030226175600.9866.brian_252@yahoo.com>
                   ` (2 preceding siblings ...)
  2003-08-04  3:13 ` tromey at gcc dot gnu dot org
@ 2004-11-15 18:03 ` phil at mkdoc dot com
  3 siblings, 0 replies; 6+ messages in thread
From: phil at mkdoc dot com @ 2004-11-15 18:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From phil at mkdoc dot com  2004-11-15 18:03 -------
This bug also affects GCJ 3.3.2 on GNU/Linux and 3.3.3 on Cygwin.

The class org.w3c.tidy.ParserImpl in the JTidy tool is another test case.

http://sourceforge.net/projects/jtidy/



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phil at mkdoc dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/9866] static nested class refers to private member of outer class
       [not found] <bug-9866-4218@http.gcc.gnu.org/bugzilla/>
  2006-11-09 14:16 ` pmladek at suse dot cz
@ 2007-01-09 20:47 ` tromey at gcc dot gnu dot org
  1 sibling, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tromey at gcc dot gnu dot org  2007-01-09 20:44 -------
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.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libgcj/9866] static nested class refers to private member of outer class
       [not found] <bug-9866-4218@http.gcc.gnu.org/bugzilla/>
@ 2006-11-09 14:16 ` pmladek at suse dot cz
  2007-01-09 20:47 ` tromey at gcc dot gnu dot org
  1 sibling, 0 replies; 6+ messages in thread
From: pmladek at suse dot cz @ 2006-11-09 14:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]



------- Comment #6 from pmladek at suse dot cz  2006-11-09 14:16 -------
I still see the problem with gcj (GCC) 4.1.2 20061018 (prerelease) (SUSE
Linux). 

It makes problems also with OpenOffice.org when the internally used hsqldb is
compiled and used with gcj/gij.

Note that it is really a bug. The java documentation says at
http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html:
--- cut ---
A nested class is a member of its enclosing class and, as such, has access to
other members of the enclosing class, even if they are declared private.
--- cut ---

There is another definition in the "Java Language Specification" at
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.1:
--- cut ---
Otherwise, if the member or constructor is declared private, then access is
permitted if and only if it occurs within the body of the top level class
(§7.6) that encloses the declaration of the member or constructor.
--- cut ---

Note that also C++ works this way. The OPOSITE problem is even mentioned in the
"Frequently reported non-bugs" at http://gcc.gnu.org/bugs.html#nonbugs_cxx:
--- cut ---
Nested classes can access private members and types of the containing class.

    Defect report 45 clarifies that nested classes are members of the class
they are nested in, and so are granted access to private members of that class.
--- cut ---


-- 

pmladek at suse dot cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmladek at suse dot cz


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9866


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-09 20:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030226175600.9866.brian_252@yahoo.com>
2003-05-25 20:56 ` [Bug java/9866] static nested class refers to private member of outer class pinskia@physics.uc.edu
2003-08-03 18:30 ` [Bug libgcj/9866] " pinskia at physics dot uc dot edu
2003-08-04  3:13 ` tromey at gcc dot gnu dot org
2004-11-15 18:03 ` phil at mkdoc dot com
     [not found] <bug-9866-4218@http.gcc.gnu.org/bugzilla/>
2006-11-09 14:16 ` pmladek at suse dot cz
2007-01-09 20:47 ` tromey at gcc dot gnu dot org

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).