jcf-write.c (generate_classfile): Check that field is primitive or string before emitting ConstantValue attribute.
* jcf-write.c (generate_classfile): Check that field is primitive or string before emitting ConstantValue attribute. From-SVN: r45306
This commit is contained in:
parent
f0cdee96aa
commit
be0c7ff405
@ -1,3 +1,8 @@
|
||||
2001-08-30 Per Bothner <per@bothner.com>
|
||||
|
||||
* jcf-write.c (generate_classfile): Check that field is primitive
|
||||
or string before emitting ConstantValue attribute.
|
||||
|
||||
2001-08-30 Per Bothner <per@bothner.com>
|
||||
|
||||
* parse.y (resolve_qualified_expression_name): If creating a
|
||||
|
@ -2885,7 +2885,9 @@ generate_classfile (clas, state)
|
||||
PUT2(i);
|
||||
have_value = DECL_INITIAL (part) != NULL_TREE
|
||||
&& FIELD_STATIC (part) && CONSTANT_VALUE_P (DECL_INITIAL (part))
|
||||
&& FIELD_FINAL (part);
|
||||
&& FIELD_FINAL (part)
|
||||
&& (JPRIMITIVE_TYPE_P (TREE_TYPE (part))
|
||||
|| TREE_TYPE (part) == string_ptr_type_node);
|
||||
if (have_value)
|
||||
attr_count++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user