Bug 8626 - warn for non-static references to static members
Summary: warn for non-static references to static members
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.3
: P3 enhancement
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on: 28067
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-18 13:16 UTC by Tom Tromey
Modified: 2007-01-09 20:44 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-30 05:25:53


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2002-11-18 13:16:01 UTC
The compiler in eclipse can give a warning
if it sees code that references a static object
in a non-static context.
This seems like a sensible (if only occasionally useful)
warning.

Release:
unknown
Comment 1 Andrew Haley 2003-05-22 17:16:10 UTC
Why should anyone want such a warning?  Surely lots of code
references static objects in non-static contexts.
Comment 2 Tom Tromey 2003-06-17 01:41:58 UTC
What this means is give a warning if you write,
eg:
   foo.bar()
where "bar" is a static method.
This is perfectly valid, but weird.
The eclipse compiler, and rightly so I think,
flags this as a warning.
Comment 3 Andrew Pinski 2003-06-30 14:14:08 UTC
feedback received and I agree with Tom on this one.
Comment 4 Tom Tromey 2007-01-09 20:44:20 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.