From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60378 invoked by alias); 27 Dec 2018 06:22:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 60364 invoked by uid 89); 27 Dec 2018 06:22:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=played, complains X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.50.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Dec 2018 06:22:16 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 887116EBB for ; Thu, 27 Dec 2018 00:22:14 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id cP3egVzF3YTGMcP3egJsOD; Thu, 27 Dec 2018 00:22:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tws3grD0QXqvn4XbvFp2FkCmdouu2fPHDCGBw3dqBXc=; b=gNu1vUKfjZ0nWXKo8XAppRIfvm hdZuSxbpfuVJ00tfFBhKJwz5dLsdkZbDyNT7104h98Ybq5bjQ9Jr03iQ0K++uOMUD1zqywFZvKjNF hxasYreIsjYLazUe1dW5t5WlP; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:58142 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gcP3e-001aoz-9P; Thu, 27 Dec 2018 00:22:14 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [PATCH 00/12] Remove some ALL_* iteration macros References: <20181125165439.13773-1-tom@tromey.com> <20181223070033.GB8096@adacore.com> <87zhsuprvq.fsf@tromey.com> <6e551a8d-6c3a-de70-38f3-82ec286a47aa@simark.ca> <87muorq5wo.fsf@tromey.com> <87imzfq5qq.fsf@tromey.com> <5a866c46-31bb-6b83-c737-5a2c170c0f01@simark.ca> <87efa3q4t9.fsf@tromey.com> <87a7krq2cb.fsf@tromey.com> <98db74fefda4685225fefdb4a04e74c7@simark.ca> Date: Thu, 27 Dec 2018 06:22:00 -0000 In-Reply-To: <98db74fefda4685225fefdb4a04e74c7@simark.ca> (Simon Marchi's message of "Wed, 26 Dec 2018 19:45:40 -0500") Message-ID: <871s63pjze.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-12/txt/msg00356.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> When I played with it, the compiler did not complain when I used: Simon> for (objfile *objfile : ...) Simon> That was with gcc 8.2.0. Do you know if it's really problematic with Simon> other compilers/versions? That case is fine, but the problem is a case like: for (objfile *objfile : ...) for (objfile *objfile2 : ...) Here the compiler complains about the inner for, because 'objfile' is a variable. Another case was one where 'symtab' was the name of a function parameter, causing problems with "for (symbtab *... : ...)" Tom