This is the mail archive of the
mailing list for the GCC project.
Re: Reformatting and minor code changes for dwarf2out.c
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Dec 2001 11:31:33 -0800
- Subject: Re: Reformatting and minor code changes for dwarf2out.c
- References: <10112251709.AA21917@vlsi1.ultra.nyu.edu>
- rtx x = XVECEXP (expr, 0, par_index);
- if (GET_CODE (x) == SET &&
- (RTX_FRAME_RELATED_P (x) || par_index == 0))
- dwarf2out_frame_debug_expr (x, label);
+ if (GET_CODE (XVECEXP (expr, 0, par_index)) == SET
+ && (RTX_FRAME_RELATED_P (XVECEXP (expr, 0, par_index))
+ || par_index == 0))
+ dwarf2out_frame_debug_expr (XVECEXP (expr, 0, par_index), label);
Please do not un-factor code like this. I find the later much
harder to read. In addition, with ENABLE_RTL_CHECKING, this
- const char *p = lbasename (get_AT_string (unit_die, DW_AT_name));
- name = (char *) alloca (strlen (p) + 64);
- sprintf (name, "%s.", p);
+ p = (char *) lbasename (get_AT_string (unit_die, DW_AT_name));
+ name = (char *) alloca (strlen (p) + 64);
+ sprintf (name, "%s.", p);
You are undoing Kaveh's work to eliminate -Wcast-qual warnings.
- /* Remember a type in the incomplete_types_list. */
- static void
- add_incomplete_type (type)
- tree type;
- VARRAY_PUSH_TREE (incomplete_types, type);
Why? Yes, it was used one place, so what? Mark it inline if you must.
- if (TREE_CODE (decl) == ERROR_MARK)
- /* If this ..._DECL node is marked to be ignored, then ignore it. */
if (DECL_IGNORED_P (decl))
So you've proven then that we won't get error_mark_node here
and crash with ENABLE_TREE_CHECKING on the DECL_IGNORED_P?
Three occurrences of this.
And, as with any change to one of the debug emitters, you ran
the GDB testsuite to verify no regressions as well, right?