OSDN Git Service

authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 1998 17:01:53 +0000 (17:01 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 1998 17:01:53 +0000 (17:01 +0000)
* 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

gcc/java/ChangeLog
gcc/java/jcf-parse.c

index e86a2b6..e81caeb 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 1998-12-16  Tom Tromey  <tromey@cygnus.com>
 
        * parse-scan.y (qualified_name): Use correct sprintf format.
index 5d8a5e0..5186e6f 100644 (file)
@@ -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);