gcj and XGraphicsConfiguration bugs

Scott Gilbertson scottg@mantatest.com
Mon Jul 21 17:08:00 GMT 2003


Patching now....
I'm changing "class FontMetricsCache" should be "static class
FontMetricsCache", in case you want to make the same change on your side,
pending my patch. My faulty code shouldn't have compiled in gcj either. I
compiled a small test case (attached) with gcj and with Sun javac. The
error is caught in java but not in gcj.
I wonder if this is a known bug in gcj?
----- Original Message -----
From: "Anthony Green" <green@redhat.com>
To: <java@gcc.gnu.org>; <scottg@mantatest.com>
Sent: Saturday, July 19, 2003 9:30 PM
Subject: gcj and XGraphicsConfiguration bugs
> ecj emits the following error when compiling XGraphicsConfiguration....
>> ----------
> 1. ERROR in ../../../gcc/libjava/gnu/awt/xlib/XGraphicsConfiguration.java
(at line 46)
> static FontMetricsCache fontMetricsCache = new FontMetricsCache ();
> ^^^^^^^^^^^^^^^^^^^^^^^
> No enclosing instance of type XGraphicsConfiguration is accessible. Must
qualify the allocation with an enclosing instance of type
XGraphicsConfiguration (e.g. x.new A() where x is an instance of
XGraphicsConfiguration).
> ----------
> make: *** [gnu/awt/xlib/XGraphicsConfiguration.class] Error 255
>>> This looks like a reasonable error. FontMetricsCache is an inner
> class and I suppose you shouldn't be able to allocate one like
> this.
>> The work-around I used for building libgcj with ecj was
> to replace "new FontMetricsCache ()" with "null". Obviously we need a
> proper fix (to both libgcj and gcj).
>> I don't know this code well enough to suggest a solution.
>> AG
>> --
> Anthony Green <green@redhat.com>
> Red Hat, Inc.
>-------------- next part --------------
A non-text attachment was scrubbed...
Name: StaticInner.java
Type: application/octet-stream
Size: 146 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20030721/b8163a0e/attachment.obj>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /