Bug 8626

Summary: warn for non-static references to static members
Product: gcc Reporter: Tom Tromey <tromey>
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: enhancement CC: gcc-bugs, java-prs
Priority: P3 Keywords: diagnostic
Version: 3.3   
Target Milestone: 4.3.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-09-30 05:25:53
Bug Depends on: 28067    
Bug Blocks:    

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.