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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D635D3858CDA for ; Tue, 24 Oct 2023 21:56:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D635D3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D635D3858CDA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698184569; cv=none; b=c9W9SEDnl8cXPd8y+DP+JQ8u/kIxPNf5Ys5cxgW/EWcJcu0xAmaHNc1O59GsGSrrFXiE8qvN0vC0LsyB14xLdaV5DaT0Cn//wS9aSKzPV5iqxRt5ovvwjE0lS66r/5Ixqbul58++R+kAJGjy691YcGXHEJelRhJeYya3p3Xq4M0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698184569; c=relaxed/simple; bh=+cMLD56wjNL60x0sxSARs7INhZD6U4POdOLA1Y9erfc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WBXzxcjfIcsaOA+uYisbgvyHBg7R1K4kuu5THOJTrOt9ZBl2WXaAdQFkCRuUnKFXYKmfWm0nnMi5xghXOeOQjlegkcnR0qTC6Za6fSlcP3Sqp2/KNSZ4CC+99pudpbzHYd0qsGXz/M/ZtP+0ILZ3cMMD3kY07WOeaA2xL6lHgQo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698184567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SYTxi33ZVaxIXzDPZDF8jaoKoHw/fgB07+yALJ5/gn4=; b=G0azYHOG28YfslnxmgiK7WUD9E8kn5eLezZ5+zF3q/plUBD8mJZ/dHh4lztqfyB5sqpejB NN+6IR/9lSajFvv+fv16/SBk6TcjGevcJ5gybMBjD0Lc9NOWbi81xbd8LvDcWbteximdQ1 uOYkBCFrXzLdsGt0cgwnRzHoPucLOoM= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-147-vpoGLRtoP9aR8Z3kXHTxDg-1; Tue, 24 Oct 2023 17:56:06 -0400 X-MC-Unique: vpoGLRtoP9aR8Z3kXHTxDg-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-41b83b8dbe1so62396531cf.1 for ; Tue, 24 Oct 2023 14:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698184565; x=1698789365; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SYTxi33ZVaxIXzDPZDF8jaoKoHw/fgB07+yALJ5/gn4=; b=jvrf8WQXoDDxaFNTblKjfB+zAaoomB3lem8IrrSQy7WKdGOLpkTkSMAL5kK0Pg5MED LXZEpR2IUuQW5SXw0Hu2rEHNIQyb+ZLs/vgA98EuKufdcRxiELUcFp1mHiRQC6FJGiNL z3QPRDlwigI+TK4Cc6/0fQaRFwNnbgHwy9uqsEXQCat5dShI6r6llxOtBzjhtU1QWWRz xf858gpuYDCC1HuNVXGt/qIKitStutH9liuQmutHzIVGjz+XtOSrLmG0iCpoZqZjgzlw tYP4kwsuKBLTBHRXD/do3vZKWY9Tej73AK61vUoKISvbzIGgbHCnQSw3bFBAO7rDzvEU +Jzw== X-Gm-Message-State: AOJu0YzNxOOJjYUdX5YHgr6XgT/ibUgCxa91CdS8UjcmYKn/xdAlobmD isPZyMhvUY9/wdfjo8vvhzqeDLslL3yLORQUBxrzdojElHOYcNN2X0+qx37OdgxMjx9oHJN1QwH IHMLTJogGeZZprt/0wDsmkTxImw== X-Received: by 2002:ac8:5952:0:b0:41e:2423:f0be with SMTP id 18-20020ac85952000000b0041e2423f0bemr6490901qtz.40.1698184565523; Tue, 24 Oct 2023 14:56:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJKWDDrspsdcHA1WCK5CEk93rjaxaNfx1xl08g7TjS4r1n+u000C8sDPGjs7L8aLhpRzEtcw== X-Received: by 2002:ac8:5952:0:b0:41e:2423:f0be with SMTP id 18-20020ac85952000000b0041e2423f0bemr6490890qtz.40.1698184565255; Tue, 24 Oct 2023 14:56:05 -0700 (PDT) Received: from [192.168.1.108] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id d23-20020ac85357000000b0041812703b7esm3758492qto.52.2023.10.24.14.56.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 14:56:04 -0700 (PDT) Message-ID: <775dc7c2-5ab4-4aee-9854-948a27c5c261@redhat.com> Date: Tue, 24 Oct 2023 17:56:04 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] c++: note other candidates when diagnosing deletedness To: Patrick Palka , gcc-patches@gcc.gnu.org References: <20231023235154.2971561-1-ppalka@redhat.com> <20231023235154.2971561-3-ppalka@redhat.com> From: Jason Merrill In-Reply-To: <20231023235154.2971561-3-ppalka@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/23/23 19:51, Patrick Palka wrote: > With the previous two patches in place, we can now extend our > deletedness diagnostic to note the other considered candidates, e.g.: > > deleted16.C: In function 'int main()': > deleted16.C:10:4: error: use of deleted function 'void f(int)' > 10 | f(0); > | ~^~~ > deleted16.C:5:6: note: declared here > 5 | void f(int) = delete; > | ^ > deleted16.C:5:6: note: candidate: 'void f(int)' (deleted) > deleted16.C:6:6: note: candidate: 'void f(...)' > 6 | void f(...); > | ^ > deleted16.C:7:6: note: candidate: 'void f(int, int)' > 7 | void f(int, int); > | ^ > deleted16.C:7:6: note: candidate expects 2 arguments, 1 provided > > For now, these these notes are disabled when a deleted special member > function is selected because it introduces a lot of new "cannot bind > reference" errors in the testsuite when noting non-viable candidates, > e.g. in cpp0x/initlist-opt1.C we would need to expect an error when > noting unviability of A(A&&). (It'd be nice if we could downgrade such > errors into notes when noting candidates...) What about my suggestion to make printing the other candidates an opt-in, with the normal output just suggesting the use of that option for more information, like -ftemplate-backtrace-limit? Jason