On Fri, Jun 10, 2016 at 06:04:47PM +0200, Marek Polacek wrote:
> > Wouldn't it be better to just walk_gimple_seq with NULL callback_op
> > and non-NULL callback_stmt that would stop on the first real stmt in there?
> 
> Ok, such as in the following?
> 
> > Also, the above loop looks confusing, I'd be expecting gimple_seq_first_stmt
> > (seq) before testing it for GIMPLE_BIND or casting to gbind.
> 
> Well, if I give a GIMPLE_BIND to gimple_seq_first_stmt, it does nothing and
> just returns it, I think.

Yeah, the current implementation has gimple_seq just pointer to the first
stmt.  But I'd think it is still nicer to differentiate between sequences
and individual statements in it.

> Bootstrapped/regtested on x86_64-linux, ok for trunk?

Ok, thanks.

> 2016-06-10  Marek Polacek  <pola...@redhat.com>
> 
>       PR middle-end/71476
>       * gimplify.c (maybe_warn_switch_unreachable): Factored out of
>       gimplify_switch_expr.
>       (warn_switch_unreachable_r): New function.
> 
>       * c-c++-common/Wswitch-unreachable-4.c: New test.
>       * gcc.dg/Wswitch-unreachable-2.c: New test.
>       * g++.dg/tm/jump1.C: Move dg-warning.

        Jakub

Reply via email to