This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Make tsi insert iterators handle chains of COMPOUND_EXPRs


Hello,

> > while this may seem strange, it is intentional; with this behavior,
> > tsi_link_xxx (tsi, a, TSI_CHAIN_END);
> > tsi_link_xxx (tsi, b, TSI_CHAIN_END);
> > 
> > will link chain b to the correct position wrto chain a, regardless of
> > what xxx is.
> 
> That doesn't make any sense at all.  "Correct" how?

meaning that if xxx == after, b will be linked after a. 
If xxx == before, b will be linked before a.

> And why
> would you be defining the behaviour I described as wrong wrt
> 
> 	tsi_link_before (tsi, a, TSI_NEW_STMT);
> 	tsi_link_before (tsi, b, TSI_NEW_STMT);

this would be fine with me; what gets wrong is that
	tsi_link_after (tsi, a, TSI_NEW_STMT);
	tsi_link_before (tsi, b, TSI_NEW_STMT);

will put b in the middle of a; which is inconsistend with the fact that
tsi_link_before would not.

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]