From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2122) id C04823882061; Fri, 6 May 2022 20:34:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C04823882061 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jason Merrill To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-161] vec: fix iterate comment X-Act-Checkin: gcc X-Git-Author: Jason Merrill X-Git-Refname: refs/heads/master X-Git-Oldrev: 967cdbe66296535fa496b88406a1125c8acaf6e2 X-Git-Newrev: e4e053a63b153039a7905901806a4f4a3154988b Message-Id: <20220506203425.C04823882061@sourceware.org> Date: Fri, 6 May 2022 20:34:25 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2022 20:34:25 -0000 https://gcc.gnu.org/g:e4e053a63b153039a7905901806a4f4a3154988b commit r13-161-ge4e053a63b153039a7905901806a4f4a3154988b Author: Jason Merrill 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::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::iterate (v, ix, &ptr); ix++) + for (ix = 0; v->iterate (ix, &val); ix++) continue; */ template