diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-07 06:03:17 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-07 06:03:17 +0000 |
commit | 295e387a04a57eea2a4932d20328369452399388 (patch) | |
tree | 85a5a4cad3cfe432c546c4df2134dac37924265c /gcc/ada | |
parent | 6fcaa06776757d517ee0abf333c03d431e182bea (diff) | |
download | gcc-295e387a04a57eea2a4932d20328369452399388.tar.gz |
* tree.c (tree_size): For all 'c' and 'x' nodes, look directly
at the sizes of the relevant structures, rather than relying
on TREE_CODE_LENGTH. Call lang_hooks.tree_size to get the
sizes of any such we don't know about. Use
lang_hooks.identifier_size for IDENTIFIER_NODE.
(initializer_zerop): Use CONSTRUCTOR_ELTS.
* tree.def: Update commentary. Make fourth element of
the definition for all 'c' and 'x' nodes zero.
* langhooks.h: New hook, tree_size / LANG_HOOKS_TREE_SIZE.
* langhooks-def.h: Update to match.
* langhooks.c: New default, lhd_tree_size.
* c-common.def (SRCLOC): Kill.
* c-pretty-print.c (pp_c_postfix_expression [case SRCLOC]):
Remove entirely - was already #if-ed out.
ada:
* ada-tree.def: Make fourth element for GNAT_LOOP_ID zero.
* misc.c (gnat_tree_size): New function.
(LANG_HOOKS_TREE_SIZE): Override.
cp:
* cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
* cp-lang.c (cp_tree_size): New function.
(LANG_HOOKS_TREE_SIZE): Override.
* cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
(union lang_tree_node): Remove common and srcloc members.
(build_srcloc_here): Don't prototype.
* decl.c (cp_tree_node_structure): Kill SRCLOC case.
* pt.c (pending_templates): Correct comment.
* tree.c (build_srcloc, build_srcloc_here): Kill.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/ada-tree.def | 2 | ||||
-rw-r--r-- | gcc/ada/misc.c | 16 |
3 files changed, 27 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 2b8bf05bb77..1993f767b7b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2003-04-06 Zack Weinberg <zack@codesourcery.com> + + * ada-tree.def: Make fourth element for GNAT_LOOP_ID zero. + * misc.c (gnat_tree_size): New function. + (LANG_HOOKS_TREE_SIZE): Override. + 2003-04-03 Jason Merrill <jason@redhat.com> * misc.c (gnat_adjust_rli): #if 0. @@ -90,10 +96,10 @@ 2003-01-29 Laurent Guerby <guerby@acm.org> - PR ada/8344 - * final.c: rename to adafinal.c to avoid file name conflicts with gcc file. - * Makefile.in: match previous change. - * Make-lang.in: match previous change. + PR ada/8344 + * final.c: rename to adafinal.c to avoid file name conflicts with gcc file. + * Makefile.in: match previous change. + * Make-lang.in: match previous change. 2003-01-29 Joel Sherrill <joel@OARcorp.com> diff --git a/gcc/ada/ada-tree.def b/gcc/ada/ada-tree.def index ec515498acf..b6172c037d7 100644 --- a/gcc/ada/ada-tree.def +++ b/gcc/ada/ada-tree.def @@ -77,4 +77,4 @@ DEFTREECODE (GNAT_NOP_EXPR, "gnat_nop_expr", '1', 1) ??? This should be redone at some point. */ -DEFTREECODE (GNAT_LOOP_ID, "gnat_loop_id", 'x', 1) +DEFTREECODE (GNAT_LOOP_ID, "gnat_loop_id", 'x', 0) diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 1a5c9dbd252..93a52eb338a 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -79,6 +79,7 @@ extern FILE *asm_out_file; extern int save_argc; extern char **save_argv; +static size_t gnat_tree_size PARAMS ((enum tree_code)); static bool gnat_init PARAMS ((void)); static void gnat_init_options PARAMS ((void)); static int gnat_decode_option PARAMS ((int, char **)); @@ -98,6 +99,8 @@ static rtx gnat_expand_expr PARAMS ((tree, rtx, enum machine_mode, #define LANG_HOOKS_NAME "GNU Ada" #undef LANG_HOOKS_IDENTIFIER_SIZE #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct tree_identifier) +#undef LANG_HOOKS_TREE_SIZE +#define LANG_HOOKS_TREE_SIZE gnat_tree_size #undef LANG_HOOKS_INIT #define LANG_HOOKS_INIT gnat_init #undef LANG_HOOKS_INIT_OPTIONS @@ -335,6 +338,19 @@ internal_error_function (msgid, ap) Compiler_Abort (fp, -1); } +/* Langhook for tree_size: determine size of our 'x' and 'c' nodes. */ +static size_t +gnat_tree_size (enum tree_code code) +{ + switch (code) + { + case GNAT_LOOP_ID: return sizeof (struct tree_loop_id); + default: + abort (); + } + /* NOTREACHED */ +} + /* Perform all the initialization steps that are language-specific. */ static bool |