This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Class file generated by "gcj -C" throws ClassFormatError
- To: Weiqi Gao <weiqigao at yahoo dot com>
- Subject: Re: Class file generated by "gcj -C" throws ClassFormatError
- From: Per Bothner <per at bothner dot com>
- Date: 22 Jun 2001 13:02:18 -0700
- Cc: java at gcc dot gnu dot org
- References: <20010622191351.96353.qmail@web13801.mail.yahoo.com>
Weiqi Gao <weiqigao@yahoo.com> writes:
> class foo {
> static long x = 255;
> public static void main(String[] args) {
> }
> }
> ...
> Fields (count: 1):
> Field name:"x" static Signature: 6=long
> Attribute "ConstantValue", length:2, value: #8=<Integer 255>
I've verified this, and it definitely needs to be fixed. It should be
easy and safe to fix this in generate_classfile, but I don't think
that is the correct fix. I think parse.y needs to add a convert
somewhere; without it the tree structure is not type-correct. I'm not
quite sure yet where to place the conversion.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/