This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcc/java/class.c patch
- To: egcs-patches at cygnus dot com
- Subject: gcc/java/class.c patch
- From: Anthony Green <green at cygnus dot com>
- Date: Sun, 9 May 1999 01:42:45 -0700
This patch allows for utf8 literals to go in read-only sections.
* class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
constant.
Index: class.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/class.c,v
retrieving revision 1.38
diff -u -r1.38 class.c
--- class.c 1999/05/05 21:09:57 1.38
+++ class.c 1999/05/09 08:27:30
@@ -583,6 +583,7 @@
TREE_TYPE (string) = str_type;
PUSH_FIELD_VALUE (cinit, "data", string);
FINISH_RECORD_CONSTRUCTOR (cinit);
+ TREE_CONSTANT (cinit) = 1;
/* Build a unique identifier based on buf. */
sprintf(buf, "_Utf%d", ++utf8_count);
@@ -608,6 +609,7 @@
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
TREE_READONLY (decl) = 1;
+ TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = cinit;
TREE_CHAIN (decl) = utf8_decl_list;
layout_decl (decl, 0);
AG
--
Anthony Green Cygnus Solutions
Sunnyvale, California