* jcf-write.c (generate_classfile): Check that field is primitive
or string before emitting ConstantValue attribute.
From-SVN: r45306
+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
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++;