From d4cf5733ee1a1e5efded2df9800e6edd64a944bd Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 31 Jan 2000 18:52:34 +0000 Subject: jump.c (redirect_jump): Move a NOTE_INSN_FUNCTION_END to the new label. * jump.c (redirect_jump): Move a NOTE_INSN_FUNCTION_END to the new label. From-SVN: r31721 --- gcc/jump.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/jump.c') diff --git a/gcc/jump.c b/gcc/jump.c index 0119d52..1f740fd 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -4639,6 +4639,13 @@ redirect_jump (jump, nlabel) if (nlabel) ++LABEL_NUSES (nlabel); + /* If we're eliding the jump over exception cleanups at the end of a + function, move the function end note so that -Wreturn-type works. */ + if (olabel && NEXT_INSN (olabel) + && GET_CODE (NEXT_INSN (olabel)) == NOTE + && NOTE_LINE_NUMBER (NEXT_INSN (olabel)) == NOTE_INSN_FUNCTION_END) + emit_note_after (NOTE_INSN_FUNCTION_END, nlabel); + if (olabel && --LABEL_NUSES (olabel) == 0) delete_insn (olabel); -- cgit v1.1