[v3] Avoid -Wall warnings in the testsuite

Andrew Pinski pinskia@gmail.com
Wed Jun 22 22:16:00 GMT 2011


On Wed, Jun 22, 2011 at 3:02 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> ... actually, there are also bogus "statement has no effect" warnings for
> line 1321 of ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp which also seem
> bogus:
>
>    PB_DS_CLASS_T_DEC
>    typename PB_DS_CLASS_C_DEC::size_type
>    PB_DS_CLASS_C_DEC::
>    get_begin_pos() const
>    {
>      size_type i = 0;
>      for (i; i < arr_size && m_a_p_children[i] == 0; ++i) // here
>    ;

No I think that warning is correct "for (i;" the statement i; has no effect.

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list