From patchwork Mon Nov 14 14:51:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 694556 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 3tHYQ610wWz9sCg for ; Tue, 15 Nov 2016 01:51:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Xo3c8uhB"; 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:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=OOAKHrLJChmJY2lpJ J8abWdP5v4FbZaad9TGvWsgoVlwy5ONX/YIbe7NTFRDjKExpUjxdCOhSA3qXfWfn cPRwpaomRYiiTUD8e7guWp+Zem0i5IwLEbqYsgQeQG0m8rgpHLv4v+LF++Hz2cnQ fgHbX70GsiDizr5EPrCDcdg2GM= 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:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=YBWoZ/Imkp6i58UpTx1SvcC RmlY=; b=Xo3c8uhB1xfG2kp9tZXlvT3hx1AHEtkoJGVFkFu5CctfFpTk3+GAjAn nilJ45qg6lTYlA/ZPWeEhItcxTtw0RqsrYR6OXMsh+CCawEgBTWI7YnSeNZnRpAe pS2gVkujIP1OfyCzIaGfrODsRlcRcO1BOfBRYrEfArtGniTjnghM= Received: (qmail 91472 invoked by alias); 14 Nov 2016 14:51:49 -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 91458 invoked by uid 89); 14 Nov 2016 14:51:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=c-cppbuiltin.c, ccppbuiltinc, UD:c-cppbuiltin.c, Hx-languages-length:2263 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Nov 2016 14:51:39 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE0C48F22B for ; Mon, 14 Nov 2016 14:51:37 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-19.brq.redhat.com [10.40.204.19]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAEEpavt009738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 14 Nov 2016 09:51:37 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id uAEEpYbx003200; Mon, 14 Nov 2016 15:51:35 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id uAEEpYSC003199; Mon, 14 Nov 2016 15:51:34 +0100 Date: Mon, 14 Nov 2016 15:51:34 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches List Subject: Re: [WIP C++ PATCH] P0217R3 - C++17 structured bindings Message-ID: <20161114145134.GY3541@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20161109122422.GX3541@tucnak.redhat.com> <20161109130525.GZ3541@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Sun, Nov 13, 2016 at 11:53:10PM -0500, Jason Merrill wrote: > On Wed, Nov 9, 2016 at 8:05 AM, Jakub Jelinek wrote: > > On Wed, Nov 09, 2016 at 01:24:22PM +0100, Jakub Jelinek wrote: > >> The following patch is a WIP on P0217R3 - decomposition declarations. > >> It contains various FIXMEs, Jason, do you think you could finish it up? > > Here's what I'm checking in, as a delta from from your patch. More > testcases would still be welcome. Do we want to check this in (tested on x86_64-linux)? Or are some further changes needed before that (e.g. has inline, constexpr, extern, static etc. been allowed for decompositions in Issaquah or not)? Are you going to update https://gcc.gnu.org/projects/cxx-status.html ? Seems during the C++ meeting clang added: Matching template template parameters to compatible arguments P0522R0 Removing deprecated dynamic exception specifications P0003R5 Pack expansions in using-declarations P0195R2 rows to their table too, are you going to add those as well (to the table and/or GCC 7)? 2016-11-14 Jakub Jelinek * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings. * g++.dg/cpp1z/feat-cxx1z.C: Test __cpp_structured_bindings macro. Jakub --- gcc/c-family/c-cppbuiltin.c.jj 2016-11-09 23:55:12.000000000 +0100 +++ gcc/c-family/c-cppbuiltin.c 2016-11-14 15:21:56.814759245 +0100 @@ -943,6 +943,7 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_deduction_guides=201606"); cpp_define (pfile, "__cpp_noexcept_function_type=201510"); cpp_define (pfile, "__cpp_template_auto=201606"); + cpp_define (pfile, "__cpp_structured_bindings=201606"); } if (flag_concepts) cpp_define (pfile, "__cpp_concepts=201507"); --- gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C.jj 2016-11-09 23:55:14.000000000 +0100 +++ gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C 2016-11-14 15:26:13.459539622 +0100 @@ -392,6 +392,12 @@ # error "__cpp_noexcept_function_type != 201510" #endif +#ifndef __cpp_structured_bindings +# error "__cpp_structured_bindings" +#elif __cpp_structured_bindings != 201606 +# error "__cpp_structured_bindings != 201606" +#endif + #ifdef __has_cpp_attribute # if ! __has_cpp_attribute(maybe_unused)