summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-12 06:49:29 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-12 06:49:29 +0000
commitb4dae43c16aabc5cac84fb5ece8365b8921a5307 (patch)
tree5b4b9de36c3d7dc6f7a0fd049bc566fd4636cabf /gcc/objc
parent79013643f74b7dc4a245677254dac312e28f2626 (diff)
downloadgcc-b4dae43c16aabc5cac84fb5ece8365b8921a5307.tar.gz
* tree.c, tree.h: Change tree_code_type, tree_code_length, and
tree_code_name from pointers to arrays. * tree.c: Remove standard_tree_code_* variables, no longer used. * print-tree.c: Remove declaration of tree_code_name. * cp/lex.c (init_lex): Update for tree_code_* changes. * objc/objc-act.c (init_objc): Likewise. * tree.def, cp/cp-tree.def, objc/objc-tree.def: Update for tree_code changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c20
-rw-r--r--gcc/objc/objc-tree.def18
2 files changed, 14 insertions, 24 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 44d859e35b3..c4a2690e815 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -86,8 +86,8 @@ Boston, MA 02111-1307, USA. */
#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-char *objc_tree_code_type[] = {
- "x",
+char objc_tree_code_type[] = {
+ 'x',
#include "objc-tree.def"
};
#undef DEFTREECODE
@@ -8022,19 +8022,9 @@ init_objc ()
gcc_obstack_init (&util_obstack);
util_firstobj = (char *) obstack_finish (&util_obstack);
- tree_code_type
- = (char **) xrealloc (tree_code_type,
- sizeof (char *) * LAST_OBJC_TREE_CODE);
- tree_code_length
- = (int *) xrealloc (tree_code_length,
- sizeof (int) * LAST_OBJC_TREE_CODE);
- tree_code_name
- = (char **) xrealloc (tree_code_name,
- sizeof (char *) * LAST_OBJC_TREE_CODE);
- bcopy ((char *) objc_tree_code_type,
- (char *) (tree_code_type + (int) LAST_CODE),
- (((int) LAST_OBJC_TREE_CODE - (int) LAST_CODE)
- * sizeof (char *)));
+ bcopy (objc_tree_code_type,
+ tree_code_type + (int) LAST_CODE,
+ (int) LAST_OBJC_TREE_CODE - (int) LAST_CODE);
bcopy ((char *) objc_tree_code_length,
(char *) (tree_code_length + (int) LAST_CODE),
(((int) LAST_OBJC_TREE_CODE - (int) LAST_CODE)
diff --git a/gcc/objc/objc-tree.def b/gcc/objc/objc-tree.def
index 03f0c715776..9d6765b295e 100644
--- a/gcc/objc/objc-tree.def
+++ b/gcc/objc/objc-tree.def
@@ -22,16 +22,16 @@ Boston, MA 02111-1307, USA. */
/* Objective-C types. */
-DEFTREECODE (CLASS_INTERFACE_TYPE, "class_interface_type", "t", 0)
-DEFTREECODE (CLASS_IMPLEMENTATION_TYPE, "class_implementation_type", "t", 0)
-DEFTREECODE (CATEGORY_INTERFACE_TYPE, "category_interface_type", "t", 0)
-DEFTREECODE (CATEGORY_IMPLEMENTATION_TYPE,"category_implementation_type","t",0)
-DEFTREECODE (PROTOCOL_INTERFACE_TYPE, "protocol_interface_type", "t", 0)
+DEFTREECODE (CLASS_INTERFACE_TYPE, "class_interface_type", 't', 0)
+DEFTREECODE (CLASS_IMPLEMENTATION_TYPE, "class_implementation_type", 't', 0)
+DEFTREECODE (CATEGORY_INTERFACE_TYPE, "category_interface_type", 't', 0)
+DEFTREECODE (CATEGORY_IMPLEMENTATION_TYPE,"category_implementation_type",'t',0)
+DEFTREECODE (PROTOCOL_INTERFACE_TYPE, "protocol_interface_type", 't', 0)
/* Objective-C decls. */
-DEFTREECODE (KEYWORD_DECL, "keyword_decl", "d", 0)
-DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", "d", 0)
-DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", "d", 0)
+DEFTREECODE (KEYWORD_DECL, "keyword_decl", 'd', 0)
+DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", 'd', 0)
+DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0)
/* Objective-C constants. */
-DEFTREECODE (OBJC_STRING_CST, "objc_string_cst", "c", 3)
+DEFTREECODE (OBJC_STRING_CST, "objc_string_cst", 'c', 3)