From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1734) id 61CD63858024; Sun, 11 Apr 2021 22:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61CD63858024 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marek Polacek To: gcc-cvs@gcc.gnu.org Subject: [gcc r10-9695] c++: Use FOR_EACH_VEC_ELT instead of range-based for loop. X-Act-Checkin: gcc X-Git-Author: Marek Polacek X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 149eef254022b00f5c933a19ea8703189ca90bcc X-Git-Newrev: 1004d3bb5e590a2cc3d22bc9fb11d3bf4978a982 Message-Id: <20210411225800.61CD63858024@sourceware.org> Date: Sun, 11 Apr 2021 22:58:00 +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: Sun, 11 Apr 2021 22:58:00 -0000 https://gcc.gnu.org/g:1004d3bb5e590a2cc3d22bc9fb11d3bf4978a982 commit r10-9695-g1004d3bb5e590a2cc3d22bc9fb11d3bf4978a982 Author: Marek Polacek Date: Sun Apr 11 16:58:09 2021 -0400 c++: Use FOR_EACH_VEC_ELT instead of range-based for loop. gcc/cp/ChangeLog: PR c++/97966 * pt.c (instantiate_class_template_1): Use FOR_EACH_VEC_ELT instead of range-based for loop. Diff: --- gcc/cp/pt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 145c0b8063f..c1752fd1894 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12134,7 +12134,9 @@ instantiate_class_template_1 (tree type) /* Now that we've gone through all the members, instantiate those marked with attribute used. */ - for (tree x : used) + unsigned int i; + tree x; + FOR_EACH_VEC_ELT (used, i, x) mark_used (x); return type;