From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 9E2843858D1E; Mon, 30 Oct 2023 19:14:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E2843858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E2843858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698693301; cv=none; b=SXzllFIx/ESGU5l495pVVlgGVD3iWzS8AOkzEPc7O1sfNGPgX0rJaAWecKzg/EuKb2vc+krPMvRFDSXQa64HOgkfPqDTM0AqHq2eg3L8wZ0VnKFhv0EtRmdcP8yvqazk45i9ckiD65oPfhk11dB5KgDbU4CHzmZ/m8yuQHiQJj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698693301; c=relaxed/simple; bh=guLnNHBWHlOchDPEjacXc8imMFQD65eowOCrnp4MaKE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=IZ2YCjmoW8mxc0JDVFdaN+t3RwZOJZ4LxOupG2bPWSWrek7XhADYqXtqMrXqw4ya34uYpm9Riqj/V6OtDNVniMJXVeO9Bm7HUVHI/8/cF4NJqNN8Bh/TJlmtT1Dhq3pRvqWkQwyaFkvpp3lzoi2bKmpN599P+yt/vRcb3nO8d1c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9d2d8343dc4so276489666b.0; Mon, 30 Oct 2023 12:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698693298; x=1699298098; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zns5zCqJ8HORJMeeCujID61DtiFjii9nL6G42PH18Ow=; b=F10oEx2fntipM+yO8ZyOppCeHlcEr5hAePcVI2KismotTMzQK7tCjfM3AloHP/ETqt Odi7aqC+QCBfWPlHvuxPXOlyqCgmCqwRnktldDAwvFBqJk6wsrIf50KIdeSmn1xRJEdc 0hYhNhYS9ZlZvEq/GmoSzSkat+y5PQHwd8I4LBlz24vRK+j3Fd+IbOBhW8bxiWJyQ7rS S677N9zVQ0s7/s+vHfr6d9j6QQGKH+n+xp3q9HfcO00nDd1tss0/Ay0EwH4k58DZgeH/ L59pRrw6CWUKitDzhdfvFJviAyBdL9V2QV+EzUVLiJwsAdNJS/f+tcsvckZm/oR6fsIP BlFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698693298; x=1699298098; h=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=zns5zCqJ8HORJMeeCujID61DtiFjii9nL6G42PH18Ow=; b=pN4LTAbI2LHQStFwcY9zZQsJ3JQ2b9wun/t8PYrWJ3jTenu0iEN6Ll1B6/9ZR21CWv N+hnvXU5iFUT7kCvAPCJKtYjrrld0zRTc81jTC5YxoIOhoL/FWijoAODhfUAiJWR45+G F0l1l4q8kYzgI0CKNdaxEZtisF+XbAS4UEDg2JLN4zoasLy6MkyAnF2HHBx1iKjhLkEi 9XIr4gPCT5IgKFUozgpFF8wjYVwujIj2Md8K80sdegBtsrOlEES/ReEZtqwZ2qPb5S6N CaC0FZX2cybcYMZKfmES83eDARVLQip7FfV6IxTgiXVeM6EZkCAfoNmd6YbAZCNw5q35 M8hA== X-Gm-Message-State: AOJu0Yzko0//v6INOQvDwJcz/EKNFEJOC3JxLyPeufGKLgx1LMMEtve0 qkooBDinZrj7DWlPXZqGKQ6+n3FOin/A8SVCZpU= X-Google-Smtp-Source: AGHT+IGkQOa9UHhvmFPMPTwHk6mEyGBbTCFiGJgN0eggG4s5ySdYP3l/aSC+b9qUgmc+AwECn2JGpe3g75CefvynYsU= X-Received: by 2002:a17:906:d552:b0:9be:77cd:4c2c with SMTP id cr18-20020a170906d55200b009be77cd4c2cmr8047054ejc.28.1698693298147; Mon, 30 Oct 2023 12:14:58 -0700 (PDT) MIME-Version: 1.0 References: <06d14459-fd2a-48ec-9e8d-ba0a195fe83a@gmail.com> In-Reply-To: <06d14459-fd2a-48ec-9e8d-ba0a195fe83a@gmail.com> From: Jonathan Wakely Date: Mon, 30 Oct 2023 19:14:46 +0000 Message-ID: Subject: Re: [committed][_GLIBCXX_INLINE_VERSION] Fix constract violation To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: Jonathan Wakely , "libstdc++" , gcc-patches Content-Type: multipart/alternative; boundary="0000000000009e53880608f3da2c" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: --0000000000009e53880608f3da2c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2023, 18:31 Fran=C3=A7ois Dumont, wro= te: > > On 30/10/2023 14:45, Jonathan Wakely wrote: > > On Sun, 29 Oct 2023 at 21:11, Fran=C3=A7ois Dumont > wrote: > >> 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 > unversioned > > // namespace, so provide a forwarding function with the expected symbol > name. > Sure, I'll update it. > > 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). > > > Good point, I see no reason neither so I'll remove it. > Thanks, looks good for trunk (and gcc-13 maybe?) with that change. > --0000000000009e53880608f3da2c--