aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2002-03-13 01:42:43 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2002-03-13 01:42:43 +0000
commit2f9834e8055d89ec753d6bea65cb734dcd8f0dc0 (patch)
tree2e0cc6a8c103f156968a4851003a3fc1f9435589 /gcc/ada
parent36ad2436427c37bac46dc216589ed936f8106f2d (diff)
downloadgcc-2f9834e8055d89ec753d6bea65cb734dcd8f0dc0.zip
gcc-2f9834e8055d89ec753d6bea65cb734dcd8f0dc0.tar.gz
gcc-2f9834e8055d89ec753d6bea65cb734dcd8f0dc0.tar.bz2
c-common.c (c_tree_code_type, [...]): Delete.
* c-common.c (c_tree_code_type, c_tree_code_length, c_tree_code_name, add_c_tree_codes): Delete. * c-common.h (add_c_tree_codes): Delete. * c-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * c-objc-common.c (c_objc_common_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. * objc/objc-act.c (objc_tree_code_type, objc_tree_code_length, objc_tree_code_name, add_objc_tree_codes): Delete. (objc_init): Don't call add_objc_tree_codes. * objc/objc-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * toplev.c (lang_independent_init): Don't set tree_code_length[IDENTIFIER_NODE]. * tree.c (tree_code_type, tree_code_length, tree_code_name): Delete definitions, moved to language front-ends. * tree.def (IDENTIFIER_NODE): Hardwire the length. * tree.h (tree_code_type, tree_code_length, tree_code_name): Const-ify. (tree_code_length): Change type to unsigned char. ada: * misc.c (gnat_tree_code_type, gnat_tree_code_length, gnat_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (gnat_init): Don't try to copy into the various tree_code arrays. ch: * decl.c (chill_tree_code_type, chill_tree_code_length, chill_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (init_decl_processing): Don't try to copy into the various tree_code arrays. cp: * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not tree_code_length. * lex.c (cplus_tree_code_type, cplus_tree_code_length, cplus_tree_code_name): Delete. (cxx_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. Don't try to copy into the various tree_code arrays. f: * com.c (tree_code_type, tree_code_length, tree_code_name): Define. java: * lang.c (java_tree_code_type, java_tree_code_length, tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (java_init): Don't try to copy into the various tree_code arrays. From-SVN: r50705
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/misc.c92
2 files changed, 48 insertions, 52 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e524ac7..c149588 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * misc.c (gnat_tree_code_type, gnat_tree_code_length,
+ gnat_tree_code_name): Delete.
+ (tree_code_type, tree_code_length, tree_code_name): Define.
+ (gnat_init): Don't try to copy into the various tree_code
+ arrays.
+
2002-03-11 Richard Henderson <rth@redhat.com>
* Makefile.in (.NOTPARALLEL): Add fake tag.
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index 99e06fe..bd4ec73 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision$
+ * $Revision: 1.20 $
* *
* Copyright (C) 1992-2002 Free Software Foundation, Inc. *
* *
@@ -77,42 +77,6 @@ extern FILE *asm_out_file;
extern int save_argc;
extern char **save_argv;
-/* Tables describing GCC tree codes used only by GNAT.
-
- Table indexed by tree code giving a string containing a character
- classifying the tree code. Possibilities are
- t, d, s, c, r, <, 1 and 2. See cp-tree.def for details. */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-
-static const char gnat_tree_code_type[] = {
- 'x',
-#include "ada-tree.def"
-};
-#undef DEFTREECODE
-
-/* Table indexed by tree code giving number of expression
- operands beyond the fixed part of the node structure.
- Not used for types or decls. */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
-
-static const int gnat_tree_code_length[] = {
- 0,
-#include "ada-tree.def"
-};
-#undef DEFTREECODE
-
-/* Names of tree components.
- Used for printing out the tree and error messages. */
-#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
-
-const char * const gnat_tree_code_name[] = {
- "@@dummy",
-#include "ada-tree.def"
-};
-#undef DEFTREECODE
-
static const char *gnat_init PARAMS ((const char *));
static void gnat_init_options PARAMS ((void));
static int gnat_decode_option PARAMS ((int, char **));
@@ -146,6 +110,45 @@ static int gnat_eh_type_covers PARAMS ((tree, tree));
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
+/* Tables describing GCC tree codes used only by GNAT.
+
+ Table indexed by tree code giving a string containing a character
+ classifying the tree code. Possibilities are
+ t, d, s, c, r, <, 1 and 2. See cp-tree.def for details. */
+
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
+
+const char tree_code_type[] = {
+#include "tree.def"
+ 'x',
+#include "ada-tree.def"
+};
+#undef DEFTREECODE
+
+/* Table indexed by tree code giving number of expression
+ operands beyond the fixed part of the node structure.
+ Not used for types or decls. */
+
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
+
+const unsigned char tree_code_length[] = {
+#include "tree.def"
+ 0,
+#include "ada-tree.def"
+};
+#undef DEFTREECODE
+
+/* Names of tree components.
+ Used for printing out the tree and error messages. */
+#define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME,
+
+const char *const tree_code_name[] = {
+#include "tree.def"
+ "@@dummy",
+#include "ada-tree.def"
+};
+#undef DEFTREECODE
+
/* gnat standard argc argv */
extern int gnat_argc;
@@ -358,21 +361,6 @@ gnat_init (filename)
lang_expand_expr = gnat_expand_expr;
decl_printable_name = gnat_printable_name;
- memcpy ((char *) (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE),
- (char *) gnat_tree_code_type,
- ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (char *)));
-
- memcpy ((char *) (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE),
- (char *) gnat_tree_code_length,
- ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (int)));
-
- memcpy ((char *) (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE),
- (char *) gnat_tree_code_name,
- ((LAST_GNAT_TREE_CODE - (int) LAST_AND_UNUSED_TREE_CODE)
- * sizeof (char *)));
-
gnat_init_decl_processing ();
/* Add the input filename as the last argument. */