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 1F4B13857704 for ; Mon, 30 Oct 2023 13:45:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F4B13857704 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 1F4B13857704 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=1698673526; cv=none; b=U42d3bVnurfubDQqtJYl59p1MOznUN00iMoxbEWt95akb7FETx+phhnd7kl7ce3pIereMZdwxkvrFu4ifFYWtYQEK1uk6ASIqaFUNBPh/MOdDsRdrQ4WMh0Mra+tJAqwEU1twhF8pfZ1cSBxqv3YfTdKz/S7F+HDJw2bGiE74Pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698673526; c=relaxed/simple; bh=qzKFQARoL2Uq0WvsWZMAbo0fWquSU/Q9e6QHISYCpAI=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=M3hQLB0BmuPv1TKqFZpRKBsro4t0Tz2qMvM/H5x+sCbwtf/CMyqnbFUfsTT8cJG8zLVFl6CfwzBCatqmOTIvJxHRDlsXwL8lLKT2AlhhvEsdAL4VcRxFHPWA2u0zT1QpY+7WWdT8gg2L/i5IU9D+hj2T/NnsNxEHPAiCPfYUZ2c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698673524; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F5v4mFmNsslMG4bdVbxsHWxnRdCHz+JJETUPP1JuRzI=; b=ia7G6+JbRDjsvXtmiss7t+i1+yfIg0VaeZYOsDESo8ccUAoT8KtrYmNP7Q8hpksV39nQe3 LGwYfqUWy4WaSKgzKxsNITcUUUIraMtuVWukyU/sF7a8HaWs+4tmwgC/tkbLeZ0HI7Fvcu BnxKWM/KSwCy69GE6p6fBcZLGK1nmP8= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-333-zlN1dFhPP1K13BvpEzO_wg-1; Mon, 30 Oct 2023 09:45:21 -0400 X-MC-Unique: zlN1dFhPP1K13BvpEzO_wg-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-5a7b53a48e5so48399617b3.1 for ; Mon, 30 Oct 2023 06:45:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698673518; x=1699278318; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F5v4mFmNsslMG4bdVbxsHWxnRdCHz+JJETUPP1JuRzI=; b=qDyXD2tfq/F+aSB6Xt3r/h/z/olWGjXNu7jmJYR+HAH4rtfyeI9ZU7pc/mtfz+yMHj E9hzw3S6+YKhjguLXReucjJuNjx6XlhJzUrXWSkxvf03Jo31dMLoYlCOGLihnd3xsTlm hAIuVXM+vbke4nPlnfB81dTK/7aPiGurLVaHfg6BIy3u3Zm+5VRiMB4VTppZ3m37tHjc Qqn3h9RnVj+YTUoLn4EjVuCcgocO4ZVq1CfRJ4npKTe7mioNYUWAoqHJ4gd/1eE0dI1c X5IdnJ58lV/7sVeT8MPx+F8liFXjDtHN1cOQ+yCU768Y+/IdUyzNZ7x8LZUosUMiTI6I a+ww== X-Gm-Message-State: AOJu0YxbU6xPZ8zc/nCwPLTJSqsIahGjl2N1sqn9CMhn9rPDZk7ARkYB dTPUyBXa3zkXhNTeygTUOXFv0QNnwNZABYd/liofZ2cPjqokiIZWh5ORlWdXtTH7J+1iziV3Ers yQjWosPjPgAhJseEFquRmn1Ntd/OzZVg= X-Received: by 2002:a81:451e:0:b0:5a7:fc20:7848 with SMTP id s30-20020a81451e000000b005a7fc207848mr8432310ywa.1.1698673518045; Mon, 30 Oct 2023 06:45:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlZ74lN20AtzWzmR97p1t28jZaQMBwHrSMLbCswuv1v0nfuRkL00sl/VFSBy45+t7X/EiOC0VVnWGeVhBrcwQ= X-Received: by 2002:a81:451e:0:b0:5a7:fc20:7848 with SMTP id s30-20020a81451e000000b005a7fc207848mr8432292ywa.1.1698673517828; Mon, 30 Oct 2023 06:45:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 30 Oct 2023 13:45:06 +0000 Message-ID: Subject: Re: [committed][_GLIBCXX_INLINE_VERSION] Fix constract violation To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.7 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=unavailable 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 Sun, 29 Oct 2023 at 21:11, Fran=C3=A7ois Dumont w= rote: > > This fixes handle_contract_violation under versioned namespace mode. > > Tested under Linux x64 and confirmed to also fix Darwin build. > > libstdc++: [_GLIBCXX_INLINE_VERSION] Provide handle_contract_violation > symbol > > libstdc++-v3/ChangeLog: > > * src/experimental/contract.cc > [_GLIBCXX_INLINE_VERSION](handle_contract_violation): Provide > symbol > without version namespace decoration for gcc. >+#if _GLIBCXX_INLINE_VERSION >+// Provide symbol without version namespace decoration for gcc. For the comment in the code, I think this would be better: // The compiler expects the contract_violation class to be in an unversione= d // namespace, so provide a forwarding function with the expected symbol nam= e. Do we want the forwarding function to be a weak symbol? The main handler function is weak because we want users to be able to override it with their own handler. But for this new forwarding function, they can't even declare it (because it has a reserved name that doesn't demangle to a valid type for the versioned namespace build).