From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 5C5603857C7E for ; Thu, 27 May 2021 15:07:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5C5603857C7E Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-qyDR4AQ1OOmvOyg-mIvkaA-1; Thu, 27 May 2021 11:07:43 -0400 X-MC-Unique: qyDR4AQ1OOmvOyg-mIvkaA-1 Received: by mail-qv1-f69.google.com with SMTP id n12-20020a0c8c0c0000b02901edb8963d4dso266724qvb.18 for ; Thu, 27 May 2021 08:07:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AHgSzfF4Z/EnXXIPh5X1frWA5s/P7oCE1uj4owTUl8M=; b=MTKQH1ryM7ZwF/jxETt4pchmivz6Ysh/UgUVE5ybD6yHmYN9qNHGV09ao4Wz15uyvL ICfC0po1n4cEx+4qZLpUU7BdxMW1gwOnmmQZ8xKCRPF7a3DPzfak1ONhKjvtAspS+yyi BLRkrOYsSIyaVCDZPItt8P1i6njxzzmiEqJgDcMnE//um5PUFGU4Br4v1KSkempyLKsv 0x8e2MK02LjGJU8aFhJxrSXRwjx05HA6hat0439Xpg8YKFY/nkK+Som7tnObmrfSGAXj PLl32zrpx0EFRRS2mCdfJt1yPaBcEv98YAvZWJhp7EmJ+7fHz2iPQbY3/F7dS6Mhf22m Jlgw== X-Gm-Message-State: AOAM531VcoBSIKjmXfT/yF0VqwgslpjxX1IY9AlHb2Ogs2DYeR3Ac/T+ fLyyUk6wK5AEHa3GMkTJFci/LNMxyz2HFDyCBmjfA2ykHhKlebWd7tj6slR3JV6TVLbjmWKWvrV P7pjgYW0UdYlnYRUjQE/RxRaXwTNg56F4xjOUYLn7MrwG7NfNNbVaIvUzhrvcK79+uw== X-Received: by 2002:ac8:5f90:: with SMTP id j16mr3621981qta.329.1622128062240; Thu, 27 May 2021 08:07:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX1KVdqBOEkv2Z8pQY3M34BBcmJbB0Wu8txbSy3rjf7RxOO6dbRBWXs4vRvEgD3UCJIstlEg== X-Received: by 2002:ac8:5f90:: with SMTP id j16mr3621955qta.329.1622128061878; Thu, 27 May 2021 08:07:41 -0700 (PDT) Received: from [192.168.1.148] ([130.44.159.43]) by smtp.gmail.com with ESMTPSA id f8sm1503668qko.131.2021.05.27.08.07.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 May 2021 08:07:41 -0700 (PDT) Subject: Re: [PATCH] c++: Output less irrelevant info for function template decl [PR100716] To: Matthias Kretz , gcc-patches@gcc.gnu.org References: <3000132.OxmWWEHjG1@excalibur> <2208926.MkxnEukozC@excalibur> From: Jason Merrill Message-ID: Date: Thu, 27 May 2021 11:07:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <2208926.MkxnEukozC@excalibur> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_SBL, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2021 15:07:48 -0000 On 5/26/21 5:29 PM, Matthias Kretz wrote: > New revision which can also be compiled with GCC 4.8. > > From: Matthias Kretz > > Ensure dump_template_decl for function templates never prints template > parameters after the function name (it did with -fno-pretty-templates) > and skip output of irrelevant & confusing "[with T = T]" in > dump_substitution. > > gcc/cp/ChangeLog: > > PR c++/100716 > * error.c (dump_template_bindings): Include code to print > "[with" and ']', conditional on whether anything is printed at > all. This is tied to whether a semicolon is needed to separate > multiple template parameters. If the template argument repeats > the template parameter (T = T), then skip the parameter. This description should really be in a comment in the code, rather than the ChangeLog. OK either way. > (dump_substitution): Moved code to print "[with" and ']' to > dump_template_bindings. > (dump_function_decl): Partial revert of PR50828, which masked > TFF_TEMPLATE_NAME for all of dump_function_decl. Now > TFF_TEMPLATE_NAME is masked for the scope of the function and > only carries through to dump_function_name. > (dump_function_name): Avoid calling dump_template_parms if > TFF_TEMPLATE_NAME is set. > > gcc/testsuite/ChangeLog: > > PR c++/100716 > * g++.dg/diagnostic/pr100716.C: New test. > * g++.dg/diagnostic/pr100716-1.C: Same test with > -fno-pretty-templates. > --- > gcc/cp/error.c | 59 +++++++++++++++----- > gcc/testsuite/g++.dg/diagnostic/pr100716-1.C | 54 ++++++++++++++++++ > gcc/testsuite/g++.dg/diagnostic/pr100716.C | 54 ++++++++++++++++++ > 3 files changed, 152 insertions(+), 15 deletions(-) > create mode 100644 gcc/testsuite/g++.dg/diagnostic/pr100716-1.C > create mode 100644 gcc/testsuite/g++.dg/diagnostic/pr100716.C > > > -- > ────────────────────────────────────────────────────────────────────────── > Dr. Matthias Kretz https://mattkretz.github.io > GSI Helmholtz Centre for Heavy Ion Research https://gsi.de > std::experimental::simd https://github.com/VcDevel/std-simd > ────────────────────────────────────────────────────────────────────────── >