On Tue, 2014-04-22 at 13:13 -0400, David Malcolm wrote:
> On Mon, 2014-04-21 at 18:45 -0400, Trevor Saunders wrote:
> > > --- a/gcc/tree-loop-distribution.c
> > > +++ b/gcc/tree-loop-distribution.c
> > > @@ -687,8 +687,9 @@ generate_loops_for_partition (struct loop *loop, 
> > > partition_t partition,
> > >           }
> > >         else if (gimple_code (stmt) == GIMPLE_SWITCH)
> > >           {
> > > +           gimple_switch switch_stmt = stmt->as_a_gimple_switch ();
> > 
> > maybe it would make more sense to do
> > else if (gimple_switch switch_stmt = stmt->dyn_cast_gimple_switch ())
> 
> Thanks.  Yes, or indeed something like:
> 
>   else if (gimple_switch switch_stmt = dyn_cast <gimple_switch> (stmt))
> 
> (modulo the "pointerness" issues mentioned in 
> http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01334.html )

or indeed, something like:

              else if (gimple_switch switch_stmt =
                          dyn_cast <gimple_switch> (stmt))
               {


to avoid an 83-character-wide line :)

Hope that's the appropriate way to split such a line; I can never
remember if one is supposed to put the linebreak before or after the =.

Reply via email to