PATCH for c/10175: -Wunreachable-code broken

Geoffrey Keating geoffk@apple.com
Thu Apr 3 23:44:00 GMT 2003


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@apple.com>



More information about the Gcc-patches mailing list