On 04/26/2016 05:41 PM, Jakub Jelinek wrote:
On Tue, Apr 26, 2016 at 03:13:32PM +0200, Bernd Schmidt wrote:
On 04/26/2016 03:08 PM, Jakub Jelinek wrote:
^
../../gcc/reorg.c:1413:25: warning: matches this āiā under old rules
for (unsigned int i = len - 1; i < len; i--)
^
Oh, and also - I flagged this while reviewing other parts of Trevor's
changes, this pattern is too ugly to live, that should be a
FOR_EACH_VEC_ELT_....
That would be FOR_EACH_VEC_ELT_REVERSE, but unfortunately that doesn't
really work.
The iterate template does:
template<typename T, typename A>
inline bool
vec<T, A, vl_embed>::iterate (unsigned ix, T *ptr) const
{
if (ix < m_vecpfx.m_num)
{
*ptr = m_vecdata[ix];
return true;
}
else
{
*ptr = 0;
return false;
}
}
and the element in this case is std::pair <rtx_insn *, bool>, for which
*ptr = 0; doesn't work (maybe *ptr = T (); would work in there instead,
dunno).
So is the following ok if it passes bootstrap/regtest, or shall I do
something about vec.h?
Your patch is fine, and I think we should also work on vec.h separately.
Bernd