Message ID | 1409881927-61672-4-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
On 09/04/14 19:52, David Malcolm wrote: > gcc/ > * except.c (for_each_eh_label): Within param "callback", > strengthen param from rtx to rtx_code_label *. Strengthen local > "lab" from rtx to rtx_code_label *. Remove redundant check on > LABEL_P (lab), since this is known from the type rtx_code_label *. > * except.h (for_each_eh_label): Within param "callback", > strengthen param from rtx to rtx_code_label *. > * reload1.c (set_initial_eh_label_offset): Strengthen param > "label" from rtx to rtx_code_label *. OK. > { > - rtx lab = lp->landing_pad; > - if (lab && LABEL_P (lab)) > + rtx_code_label *lab = lp->landing_pad; > + if (lab) Though I do wonder what in the world LAB could be here other than a label... Maybe someone was just being paranoid. If anything were to show up here other than a label, I'd call that a bug. Though presumably that can't happen now without someone playing games with a cast :-) Jeff
diff --git a/gcc/except.c b/gcc/except.c index fecc060..55941a0 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1629,7 +1629,7 @@ remove_unreachable_eh_regions (sbitmap r_reachable) Only used by reload hackery; should not be used by new code. */ void -for_each_eh_label (void (*callback) (rtx)) +for_each_eh_label (void (*callback) (rtx_code_label *)) { eh_landing_pad lp; int i; @@ -1638,8 +1638,8 @@ for_each_eh_label (void (*callback) (rtx)) { if (lp) { - rtx lab = lp->landing_pad; - if (lab && LABEL_P (lab)) + rtx_code_label *lab = lp->landing_pad; + if (lab) (*callback) (lab); } } diff --git a/gcc/except.h b/gcc/except.h index 3259151..f47f996 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -223,7 +223,7 @@ struct GTY(()) eh_status /* Invokes CALLBACK for every exception handler label. Only used by old loop hackery; should not be used by new code. */ -extern void for_each_eh_label (void (*) (rtx)); +extern void for_each_eh_label (void (*) (rtx_code_label *)); extern void init_eh_for_function (void); diff --git a/gcc/reload1.c b/gcc/reload1.c index c18ee67..fff6d1f 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3894,7 +3894,7 @@ set_initial_elim_offsets (void) /* Subroutine of set_initial_label_offsets called via for_each_eh_label. */ static void -set_initial_eh_label_offset (rtx label) +set_initial_eh_label_offset (rtx_code_label *label) { set_label_offsets (label, NULL, 1); }