Hi,

On Wed, 19 Sep 2012, Richard Guenther wrote:

> > Just write:
> >
> >   varpool_node *vnode;
> >
> >   if ((vnode = node->try_variable ()) && vnode->finalized)
> >     varpool_analyze_node (vnode);
> >
> > This has been the standard style for the past 2 decades and trading it for
> > cascading if's is really a bad idea.
> 
> Indeed.  Btw, can we not provide a specialization for dynamic_cast <>?
> This ->try_... looks awkward to me compared to the more familiar
> 
>   vnode = dynamic_cast <varpool_node> (node)

Gah.  The less '<>' characters in source code the better.  I'm not 
thrilled, but prefer the ->try_ thingy.  And yes, cascading if's for this 
idiom is bad.


Ciao,
Michael.

Reply via email to