Bug 4811 - Incorrect error accessing non-existant outer field
Summary: Incorrect error accessing non-existant outer field
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.1
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
: 8432 (view as bug list)
Depends on: 28067
Blocks: 18131
  Show dependency treegraph
 
Reported: 2001-11-06 18:56 UTC by Bryce McKinlay
Modified: 2007-01-09 20:43 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-23 05:23:47


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bryce McKinlay 2001-11-06 18:56:01 UTC
The following test case reports the wrong error message:

public class Local2
{
  class I
  {
    void j()
    {
      int i = q;
    }
  }
}

$ gcj -c Local2.java 
Local2.java: In class `Local2$I':
Local2.java: In method `Local2$I.j()':
Local2.java:7: Local variable `q' can't be accessed from within the inner class `Local2$I' unless it is declared final.

Release:
trunk
Comment 1 Dara Hazeghi 2003-05-12 11:43:34 UTC
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: bryce@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: java/4811: Incorrect error accessing non-existant outer field
Date: Mon, 12 May 2003 11:43:34 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=4811
 
 Hello,
 
 I can confirm that this problem still occurs on gcc 3.2, 3.3 branch and  
 mainline (20030511).
 
 Dara
Comment 2 Andrew Pinski 2004-01-07 20:01:38 UTC
*** Bug 8432 has been marked as a duplicate of this bug. ***
Comment 3 Tom Tromey 2007-01-09 20:43:45 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.