This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH Java compiler patch
- To: egcs-patches at cygnus dot com
- Subject: PATCH Java compiler patch
- From: Per Bothner <bothner at cygnus dot com>
- Date: Wed, 16 Dec 1998 17:03:21 -0800
I checked this in.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner
Wed Dec 16 14:42:19 1998 Per Bothner <bothner@cygnus.com>
* jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
(HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
Index: jcf-parse.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/java/jcf-parse.c,v
retrieving revision 1.50.2.15
diff -u -r1.50.2.15 jcf-parse.c
--- jcf-parse.c 1998/12/13 05:55:21 1.50.2.15
+++ jcf-parse.c 1998/12/16 22:41:15
@@ -129,7 +129,7 @@
#define HANDLE_CONSTANTVALUE(INDEX) \
{ tree constant; int index = INDEX; \
- if (JPOOL_TAG (jcf, index) == CONSTANT_String) { \
+ if (! flag_emit_class_files && JPOOL_TAG (jcf, index) == CONSTANT_String) { \
tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); \
constant = build_utf8_ref (name); \
} \
@@ -314,6 +314,7 @@
}
value = make_node (STRING_CST);
+ TREE_TYPE (value) = build_pointer_type (string_type_node);
TREE_STRING_LENGTH (value) = 2 * str_len;
TREE_STRING_POINTER (value)
= obstack_alloc (expression_obstack, 2 * str_len);