From d78e771d468c7280b95c7dbbafcdd87d69357d80 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 7 Apr 2003 06:03:17 +0000 Subject: tree.c (tree_size): For all 'c' and 'x' nodes... * 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. From-SVN: r65323 --- gcc/c-pretty-print.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'gcc/c-pretty-print.c') diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index 685b46d..6502399 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -718,30 +718,6 @@ pp_c_postfix_expression (ppi, e) pp_initializer (ppi, e); break; -#if 0 - case SRCLOC: - pp_left_paren (ppi); - pp_identifier (ppi, "__location__"); - pp_right_paren (ppi); - pp_whitespace (ppi); - pp_left_brace (ppi); - pp_dot (ppi); - pp_identifier (ppi, "file"); - pp_whitespace (ppi); - pp_equal (ppi); - pp_c_whitespace (ppi); - pp_c_expression (ppi, SRCLOC_FILE (e)); - pp_separate_with (ppi, ','); - pp_dot (ppi); - pp_identifier (ppi, "line"); - pp_whitespace (ppi); - pp_equal (ppi); - pp_c_whitespace (ppi); - pp_c_expression (ppi, SRCLOC_LINE (e)); - pp_right_brace (ppi); - break; -#endif - case VA_ARG_EXPR: pp_c_identifier (ppi, "__builtin_va_arg"); pp_c_left_paren (ppi); -- cgit v1.1