From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108842 invoked by alias); 16 May 2017 19:36:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 108825 invoked by uid 89); 16 May 2017 19:36:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,KAM_COUK,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=evidently, H*r:smtp, neglected, expecting X-HELO: avasout03.plus.net Received: from avasout03.plus.net (HELO avasout03.plus.net) (84.93.230.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 May 2017 19:36:10 +0000 Received: from webmail.plus.net ([84.93.237.82]) by avasout03 with smtp id M7c81v0061nM8nG017c9qh; Tue, 16 May 2017 20:36:11 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=BeGo6vl2 c=1 sm=1 tr=0 a=k49VtrWLZTL8DnM+6AvpWw==:117 a=8YZdF9bm7lDkcydB81w8Xw==:17 a=vpjNtYboqT8A:10 a=kj9zAlcOel0A:10 a=tJ8p9aeEuA8A:10 a=yPCof4ZbAAAA:8 a=vQDrulBmG0kpFgE8B6gA:9 a=CjuIK1q_8ugA:10 X-AUTH: jessaminenet+adam@:2501 Received: from munkyhouse.force9.co.uk ([84.92.42.80]) by webmail.plus.net with HTTP (HTTP/1.1 POST); Tue, 16 May 2017 20:36:08 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 May 2017 19:41:00 -0000 From: Adam Butcher To: Paolo Carlini Cc: Jason Merrill , gcc@gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [C++ Patch] Remove is_auto_or_concept, etc In-Reply-To: References: <5859ec12-a027-c944-57a4-7c49320429c6@oracle.com> <24d74e87-7b21-0f8f-fe9b-08d0824a2c64@oracle.com> Message-ID: <62db87448128d8cfb52b4b2fdebec4d8@imap.force9.net> X-Sender: adam@jessamine.co.uk User-Agent: Webmail X-SW-Source: 2017-05/txt/msg01321.txt.bz2 Sorry for not getting back to your original post Paolo. I haven't been picking up mails for a while. On 2017-05-01 16:56, Jason Merrill wrote: > On Thu, Apr 27, 2017 at 2:02 PM, Paolo Carlini > wrote: >> On 26/04/2017 12:32, Paolo Carlini wrote: >>> >>> in 2013 (2013-09-16) Adam added two slightly obscure functions and I >>> can't >>> find much around in terms of rationale, etc: >>> >>> is_auto_or_concept (const_tree type) >>> >>> type_uses_auto_or_concept (tree type) >>> I don't think they were there in the original 2009 version on the old lambdas branch -- but it stagnated somewhat and when I remade it against mainline (4.something) it was around the time that concepts were showing similar semantics (in terms of implicit/abbrievated templates). I made a cardinal sin and introduced an overly-generic function name expecting that a future concepts implementation would need to trigger at the same point of the parse too. I.e. if a concept name or 'auto' is seen we inject an implicit template parameter (or make the "plain" function into a template at that point). That intent was not well documented or published (other than in the API name) and, since -fconcepts is now working without any calls to this function, it's clearly not been necessary or has been more naturally done in a different way. >>> The latter seems completely unused (it's meant for debugging >>> purposes?); >>> Quite possibly for debugging though maybe some refactoring got rid of the need for it and neglected to bin it. >>> the former evidently simply forwards to is_auto, and we end up in the >>> front-end with uses of both, which in fact are equivalent, which >>> seems >>> weird: IMHO, if they are actually equivalent in our implementation we >>> should >>> clearly explain that in the comment and have only one. Or what? >> >> >> ... replying to myself, in practice we could do the below, which >> certainly >> passes testing, and in fact now seems to me even more obvious than I >> thought >> a couple of days ago... >> Definitely OK to bin. No point in having dead or confusing code; it's complicated enough as it is. :)