On Sun, Nov 18, 2012 at 7:09 AM, Diego Novillo <dnovi...@google.com> wrote: > On Fri, Nov 16, 2012 at 6:29 PM, Ian Lance Taylor <i...@google.com> wrote: >> On Thu, Nov 15, 2012 at 1:53 PM, Diego Novillo <dnovi...@google.com> wrote: >>> 2012-11-15 Diego Novillo <dnovi...@google.com> >>> >>> Adjust for new vec API >>> (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec) >>> >>> * c-common.c: Use new vec API in vec.h. >>> * c-common.h: Likewise. >>> * c-gimplify.c: Likewise. >>> * c-pragma.c: Likewise. >>> * c-pretty-print.c: Likewise. >>> * c-pretty-print.h: Likewise. >>> * c-semantics.c: Likewise. >>> * c-decl.c: Likewise. >>> * c-parser.c: Likewise. >>> * c-tree.h: Likewise. >>> * c-typeck.c: Likewise. >> >> >>> { >>> gcc_assert (decl && DECL_P (decl) && TREE_STATIC (decl)); >>> >>> - while (!VEC_empty (tree, types_used_by_cur_var_decl)) >>> + while (types_used_by_cur_var_decl && >>> !types_used_by_cur_var_decl->is_empty ()) >> >> vec_safe_is_empty? > > Strictly speaking, yes. But in this case, the call to ->is_empty() is > already protected by a non-NULL test for types_used_by_cur_var_decl. > So you can save yourself the duplicated test.
What I meant is: the line above could be replaced by whlie (!vec_safe_is_empty (types_used_by_cur_var_decl)) Ian