aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-05-05 11:45:42 -0400
committerJason Merrill <jason@redhat.com>2022-05-06 16:33:58 -0400
commite4e053a63b153039a7905901806a4f4a3154988b (patch)
tree636f3ebe0205861156e7900127653a510852dfd0 /gcc
parent967cdbe66296535fa496b88406a1125c8acaf6e2 (diff)
downloadgcc-e4e053a63b153039a7905901806a4f4a3154988b.zip
gcc-e4e053a63b153039a7905901806a4f4a3154988b.tar.gz
gcc-e4e053a63b153039a7905901806a4f4a3154988b.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/vec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/vec.h b/gcc/vec.h
index 3ba7ea7..eed075a 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>