This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for c/10175: -Wunreachable-code broken
- From: Geoffrey Keating <geoffk at apple dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 3 Apr 2003 15:43:59 -0800
- Subject: Re: PATCH for c/10175: -Wunreachable-code broken
On Thursday, April 3, 2003, at 03:35 PM, Jason Merrill wrote:
+ /* Back up to the first NOTE preceding avoided_insn; flow passes
us the
+ head of a block, a NOTE_INSN_BASIC_BLOCK, which often follows
the line
+ note. */
+ for (insn = PREV_INSN (avoided_insn); ; insn = PREV_INSN (insn))
+ if (GET_CODE (insn) != NOTE)
+ {
+ insn = NEXT_INSN (insn);
+ break;
+ }
+
This code looks right, but the comment might be better written as "Back
up to the first of any NOTEs preceding avoided_insn'.
--
Geoff Keating <geoffk at apple dot com>