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 0398B3858D1E for ; Tue, 21 May 2024 21:32:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0398B3858D1E 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 0398B3858D1E 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=1716327124; cv=none; b=j0/XE81MXmChyYci3DL2hywV6B6A4q7ToGGW+gEdhabDagI53v4jTGp+hPzNIh0mxe5l8xyrzdayOFb0FpQwDWOkTrWCHoYBCdyzoJMQd/0al6FMySqL+vM7pOUCkRzvf1JbybA2eTWP5jlNYIwkBDVWqgbThbI2oZXdDXZtNLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716327124; c=relaxed/simple; bh=VQL61bxAaB1GfM/Eq2R3ugKmkm2Ab592vgsetaZQrls=; h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version; b=nM0VxxBcrivElC86JXSGJG0O9UUkAj/1VfAOiMq+ZElfoYaEx7UYWllfG0+4qSLqHxcoMerJTUh7urTDHh3s4S1cmfz4vQQMEhvnK/baG/QZ80a+2Kb/WO7UYQshAQ4GSUFU2edJyQD5hlIns2UPba43nkm8M32jOJHiF5+G78U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716327122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YyGYwoSajGq9D6YdHPknBKmBisxKQ7pPlm8GcdMzYqI=; b=MfF6/ZxFmv5J36jbDdE3ElP3GppeEp/lfstAX2RlQCcUScRcKRVwdRgR7WTpRfZBMFlMm5 BzbJOkTyIdX9a4QwtVylzJGegji/U/qilTLDP34jhpGLnLYI5cVSjyGb/XvpPckA/5eS0p tG0yTbEnARJQGXz1HkQHadSKw4468MU= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-67-g2M1xcvKMiycGjmGR_zs5Q-1; Tue, 21 May 2024 17:32:01 -0400 X-MC-Unique: g2M1xcvKMiycGjmGR_zs5Q-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6aa7cbfecd3so30527946d6.2 for ; Tue, 21 May 2024 14:32:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716327119; x=1716931919; h=mime-version:references:message-id:in-reply-to:subject:cc:to:date :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YyGYwoSajGq9D6YdHPknBKmBisxKQ7pPlm8GcdMzYqI=; b=F/jllKS5K+RLRkNB20wIENViymtAhs6lMOlqnA8ersUnimVPpDnABtC0clcYMTcqtI VpO7wfgvTqSPhbr4zOHSKQQEqefhkicku1AEyDg0/uZYoBFGPE1IWGDTCkvxUttF3MlZ 4TT7Qnx19hFpQB5fPfovYmHriyfm+mi5cKDXwuP1Kp56ybejcmztFJjmpcj95/hxnimG w6v9cK0NlQXnMgl68Q/Qb6BDCL/5YYbZKeP+NOMI0b7moSq6URFmyO05KfiADhmQ+v94 eWLb5O4UNp9KoZVeSfGh5ySlrU5MfC3kuDllyu6hnT+BivqJXQOqpYe74IQCDzE8SDlg Qfrg== X-Forwarded-Encrypted: i=1; AJvYcCWa2o/g0q6YahTVZ+uBF3OiU4oTUaUh80h5k2RbRoeHyd0LEUUw6/b/xiq8MmW2uW4y00YPwQZDo3tVUDnTo0vIB1MwhzkFQw== X-Gm-Message-State: AOJu0Yza44qYZzCkeMX6GISkhj4YfabMLTG6fu/uJQYlVJ9x6hFPp4Ao GXEmqNnoK+GQZdsoKhjZNaUS+VfYsYKandcQjHIfg2ll1sB0AkE4lAl3IS4mOAhd7waxk81f4DM ykoX/AhCYq2hY8PJ8+JtiszeJLnM/zH/qifH+72v3iRTqmaDSNbM4ixnHqkhBxRM= X-Received: by 2002:a05:6214:419b:b0:6a9:5cf8:4c7b with SMTP id 6a1803df08f44-6ab7f3398bfmr1503956d6.7.1716327119185; Tue, 21 May 2024 14:31:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFOwIQylzJAdMbA4LzPf3Hsu28zOpNsU3DPg8fLsiXAqFb06nM5VHhYIK161CwaWJ4heitxA== X-Received: by 2002:a05:6214:419b:b0:6a9:5cf8:4c7b with SMTP id 6a1803df08f44-6ab7f3398bfmr1503766d6.7.1716327118754; Tue, 21 May 2024 14:31:58 -0700 (PDT) Received: from [192.168.1.130] (ool-18bb2a2e.dyn.optonline.net. [24.187.42.46]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f1d73c8sm126988276d6.118.2024.05.21.14.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 14:31:58 -0700 (PDT) From: Patrick Palka X-Google-Original-From: Patrick Palka Date: Tue, 21 May 2024 17:31:57 -0400 (EDT) To: Patrick Palka cc: Jason Merrill , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] c++: canonicity of fn types w/ complex eh specs [PR115159] In-Reply-To: <3356d9ff-9c60-a215-427c-9deaf6fb5024@idea> Message-ID: <15dbe3ff-d1de-4ff5-013b-a882eb998586@idea> References: <20240521193629.4129787-1-ppalka@redhat.com> <42726cf3-3bf8-499a-b455-d0181f0b8d3b@redhat.com> <3356d9ff-9c60-a215-427c-9deaf6fb5024@idea> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.5 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 Tue, 21 May 2024, Patrick Palka wrote: > On Tue, 21 May 2024, Jason Merrill wrote: > > > On 5/21/24 15:36, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk? > > > > > > Alternatively, I considered fixing this by incrementing > > > comparing_specializations around the call to comp_except_specs in > > > cp_check_qualified_type, but generally for types whose identity > > > depends on whether comparing_specializations is set we need to > > > use structural equality anyway IIUC. > > > > Why not both? > > I figured the latter change isn't necessary/observable since > comparing_specializations would only make a difference for complex > exception specifications, and with this patch we won't even call > cp_check_qualified_type on a complex eh spec. > > > > > > + bool complex_p = (cr && cr != noexcept_true_spec > > > + && !UNPARSED_NOEXCEPT_SPEC_P (cr)); > > > > Why treat unparsed specs differently from parsed ones? > > Unparsed specs are unique according to cp_tree_equal, so in turn > function types with unparsed specs are unique, so it should be safe to > treat such types as canonical. I'm not sure if this optimization > matters though; I'm happy to remove this case. FWIW if we do get rid of this case then I think in fixup_deferred_exception_variants we can assert TYPE_STRUCTURAL_EQUALITY_P is already set instead of having to set it. > > > > > Jason > > > > >