summaryrefslogtreecommitdiff
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-16 17:01:53 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-16 17:01:53 +0000
commitdb4b9be3fe5c20e36b83aa451c126665e3393b70 (patch)
treea13a7b3f2483dc18149817da3810fdbbb56b3e0a /gcc/java/jcf-parse.c
parent3db35d24180167e246be8f69f4045d17f6b9a42b (diff)
downloadgcc-db4b9be3fe5c20e36b83aa451c126665e3393b70.tar.gz
* jcf-parse.c (get_constant): Set TREE_TYPE for string constants. (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r--gcc/java/jcf-parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index 5d8a5e09c04..5186e6fd06e 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -129,7 +129,7 @@ set_source_filename (jcf, index)
#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); \
} \
@@ -312,6 +312,7 @@ get_constant (jcf, index)
}
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);