public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-161] vec: fix iterate comment
@ 2022-05-06 20:34 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-05-06 20:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:e4e053a63b153039a7905901806a4f4a3154988b

commit r13-161-ge4e053a63b153039a7905901806a4f4a3154988b
Author: Jason Merrill <jason@redhat.com>
Date:   Thu May 5 11:45:42 2022 -0400

    vec: fix iterate comment
    
    The comment for this overload, which copies the value out of the vector,
    was mostly describing the other overload, which stores a pointer into the
    vector.
    
    gcc/ChangeLog:
    
            * vec.h (vec::iterate): Fix comment.

Diff:
---
 gcc/vec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/vec.h b/gcc/vec.h
index 3ba7ea7edc2..eed075addc9 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -916,11 +916,11 @@ vec<T, A, vl_embed>::space (unsigned nelems) const
 }
 
 
-/* Return iteration condition and update PTR to point to the IX'th
+/* Return iteration condition and update *PTR to (a copy of) the IX'th
    element of this vector.  Use this to iterate over the elements of a
    vector as follows,
 
-     for (ix = 0; vec<T, A>::iterate (v, ix, &ptr); ix++)
+     for (ix = 0; v->iterate (ix, &val); ix++)
        continue;  */
 
 template<typename T, typename A>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-06 20:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 20:34 [gcc r13-161] vec: fix iterate comment Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).