This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Class file generated by "gcj -C" throws ClassFormatError


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]