From patchwork Tue Mar 28 05:50:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Trippelsdorf X-Patchwork-Id: 744087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vsg3s4BWnz9s5g for ; Tue, 28 Mar 2017 16:50:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Nr8a1pqk"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=L3pI0XGqYvYLJVUx EXVNoH4eDYOHYAbXMs8PqmhaZkv+RtzwY20suE/RaXvDzWCqD2cdT2vVKKrtwdjO WP7ecZfqoSfI8ekMG3WU2SPJlGkiTaKk9VowcIhsRIFIV0VAZGdEIK4sPzw7zl4B 4GOHgXaDsTF9UdNtXZLevUUJRrc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=bPa6rDx7iAD0vbviYKYXmp eBRCU=; b=Nr8a1pqkKtntkzeGKTomhOIxM9ndT/rhv+ZdXqXEy3I2f12OmRvk2Y SErnoZ3lAph5nH72HB6FIqLpAVprvXRi9Zw3CUDIwRuTO1VZX00TrxxxjcBdJWNr tylXE+m9fXDNLAJcr0YNEqVJ3hSQRIXvqYFkbbvwfLsbtxxBjNyYg= Received: (qmail 5802 invoked by alias); 28 Mar 2017 05:50:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5786 invoked by uid 89); 28 Mar 2017 05:50:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=7869 X-HELO: mail.ud10.udmedia.de Received: from ud10.udmedia.de (HELO mail.ud10.udmedia.de) (194.117.254.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Mar 2017 05:50:30 +0000 Received: (qmail 17116 invoked from network); 28 Mar 2017 07:50:25 +0200 Received: from ip5b405f78.dynamic.kabel-deutschland.de (HELO x4) (ud10?360p3@91.64.95.120) by mail.ud10.udmedia.de with ESMTPSA (ECDHE-RSA-AES256-SHA encrypted, authenticated); 28 Mar 2017 07:50:25 +0200 Date: Tue, 28 Mar 2017 07:50:25 +0200 From: Markus Trippelsdorf To: gcc-patches@gcc.gnu.org Subject: [PATCH committed] avoid name lookup warning in tree.c Message-ID: <20170328055025.GA11790@x4> MIME-Version: 1.0 Content-Disposition: inline In stage1 with -std=gnu++98 I see: /home/markus/gcc/gcc/tree.c: In function ‘void inchash::add_expr(const_tree, inchash::hash&, unsigned int)’: /home/markus/gcc/gcc/tree.c:8013:11: warning: name lookup of ‘i’ changed for (i = TREE_OPERAND_LENGTH (t) - 1; i >= 0; --i) ^ /home/markus/gcc/gcc/tree.c:7773:7: warning: matches this ‘i’ under ISO standard rules int i; ^ /home/markus/gcc/gcc/tree.c:7869:16: warning: matches this ‘i’ under old rules for (int i = 0; i < TREE_VEC_LENGTH (t); ++i) ^ Fix committed as obvious. PR tree-optimization/880216 * tree.c (add_expr): Avoid name lookup warning. diff --git a/gcc/tree.c b/gcc/tree.c index 8f87e7cfacb2..c87b7695c82a 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7866,7 +7866,7 @@ add_expr (const_tree t, inchash::hash &hstate, unsigned int flags) return; } case TREE_VEC: - for (int i = 0; i < TREE_VEC_LENGTH (t); ++i) + for (i = 0; i < TREE_VEC_LENGTH (t); ++i) inchash::add_expr (TREE_VEC_ELT (t, i), hstate, flags); return; case FUNCTION_DECL: