From: Nathan Sidwell Date: Wed, 7 Jul 2004 08:25:04 +0000 (+0000) Subject: * vec.h: Fix the example use. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2272d9cf7ce97e702af9a203209f4aa4a649faa9;p=gcc.git * vec.h: Fix the example use. From-SVN: r84195 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b9f703e6eb..63ebf59006a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-07-07 Nathan Sidwell + + * vec.h: Fix the example use. + 2004-07-06 Richard Henderson * langhooks-def.h (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Remove. diff --git a/gcc/vec.h b/gcc/vec.h index 2e0ab8e0bf8..be4aaad1977 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -85,9 +85,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA struct my_struct *s; - if (VEC_length(tree,s)) { we have some contents } - VEC_safe_push(tree,s,decl); // append some decl onto the end - for (ix = 0; (t = VEC_iterate(tree,s,ix)); ix++) + if (VEC_length(tree,s->v)) { we have some contents } + VEC_safe_push(tree,s->v,decl); // append some decl onto the end + for (ix = 0; (t = VEC_iterate(tree,s->v,ix)); ix++) { do something with t } */