aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@cygnus.com>1998-12-16 17:01:53 +0000
committerPer Bothner <bothner@gcc.gnu.org>1998-12-16 09:01:53 -0800
commitf868ca8f89da12e0aa3101f4da9a4dbb93549963 (patch)
treea13a7b3f2483dc18149817da3810fdbbb56b3e0a /gcc/java/jcf-parse.c
parent0252081c1ad84d0605f2c86f3f8b84d7b6e8d805 (diff)
downloadgcc-f868ca8f89da12e0aa3101f4da9a4dbb93549963.zip
gcc-f868ca8f89da12e0aa3101f4da9a4dbb93549963.tar.gz
gcc-f868ca8f89da12e0aa3101f4da9a4dbb93549963.tar.bz2
jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
� * jcf-parse.c (get_constant): Set TREE_TYPE for string constants. (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant. From-SVN: r24346
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 5d8a5e0..5186e6f 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);