This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: partial patch reversal in java/class.c
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: Re: partial patch reversal in java/class.c
- From: Per Bothner <per at bothner dot com>
- Date: 31 Aug 2001 13:09:25 -0700
- References: <m2r8tsu3fr.fsf@eureka.bothner.com>
I checked in the following, which seems to fix the problem. At least it
bootstraps and the testsuite is mostly ok. (Some regressions. I'll take
a look at those next.)
2001-08-31 Per Bothner <per@bothner.com>
* class.c (set_constant_value): When not emiting class files, then a
String ConstantValue is a utf8const_ptr_type.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.111
diff -u -p -r1.111 class.c
--- class.c 2001/08/31 06:44:22 1.111
+++ class.c 2001/08/31 20:04:59
@@ -780,8 +780,10 @@ set_constant_value (field, constant)
if (TREE_TYPE (constant) != TREE_TYPE (field)
&& ! (TREE_TYPE (constant) == int_type_node
&& INTEGRAL_TYPE_P (TREE_TYPE (field))
- && TYPE_PRECISION (TREE_TYPE (field)) <= 32))
- warning ("ConstantValue attribute of field '%s' has wrong type",
+ && TYPE_PRECISION (TREE_TYPE (field)) <= 32)
+ && ! (TREE_TYPE (constant) == utf8const_ptr_type
+ && TREE_TYPE (field) == string_ptr_type_node))
+ error ("ConstantValue attribute of field '%s' has wrong type",
IDENTIFIER_POINTER (DECL_NAME (field)));
if (FIELD_FINAL (field))
DECL_FIELD_FINAL_IUD (field) = 1;
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/