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 31B843857B96 for ; Thu, 26 May 2022 14:49:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 31B843857B96 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-m7X_YzhSMuWhwnAC-Zssmw-1; Thu, 26 May 2022 10:49:53 -0400 X-MC-Unique: m7X_YzhSMuWhwnAC-Zssmw-1 Received: by mail-ej1-f72.google.com with SMTP id p7-20020a170906614700b006f87f866117so932392ejl.21 for ; Thu, 26 May 2022 07:49:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UOqyZbqJnvBcbWVrf0giWrQFHpLL3hizfeEmeA7jPLg=; b=F1t72y5bHwm+0VwBFwY6fvdtZL1mqZjAWtzNKgqo2b+5F/x9HIiltnSUEjctULHSYf X6oBDQEa4tIfxGw7eU4KiA3U3cQaQ3k3DVFocEuBJofdF6tVt2SDG+voE/N/uKiZ0wZh OiSmk7PkXftF0GcbTYXsnAI0VnEDX1bPOu4xtaNkHZNZLPMYUP9+JcC+ALqLTZjmrTBx Ov7KNQmPn5d8p9ZQErCqdNw9lpgTSrJDh+XUJ0FG8MyHi+OhFMRjXdzucCyyDjafZLIJ TnhHZMRRj3Uj1gqOX4T3DWNHyBjrMnIP8solMGIbONSK/zmMHR3M/AO93PAJqLD3Boza Mk0g== X-Gm-Message-State: AOAM530EkNbUu9UMo2vr5UTD+fH0TtNeNLtSpis3jdukbkRGQK4T+n3W /c21JZXcCVwhyWewkGDjPn/Sc8jFjZIRisVsvsYExIsVfBeNelCYDAgettAGhMD2hJ1wOtZrKAw frtzGsn1fBcfFDlwtjieDxQNhgJUQpGI= X-Received: by 2002:a17:907:969f:b0:6ff:2027:3c8c with SMTP id hd31-20020a170907969f00b006ff20273c8cmr4400690ejc.31.1653576591969; Thu, 26 May 2022 07:49:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtXz7L7/50xFKlvsoYqZS1vjzuheZ3LOnGSlBqv6Dfwmt8fLbB7WOPZJsvdB4j76OaD9H2u08RRr1lZZMv9jM= X-Received: by 2002:a17:907:969f:b0:6ff:2027:3c8c with SMTP id hd31-20020a170907969f00b006ff20273c8cmr4400667ejc.31.1653576591673; Thu, 26 May 2022 07:49:51 -0700 (PDT) MIME-Version: 1.0 References: <0fb0ade2-7d75-08fa-d65f-7d71a591681b@gmail.com> In-Reply-To: <0fb0ade2-7d75-08fa-d65f-7d71a591681b@gmail.com> From: Jonathan Wakely Date: Thu, 26 May 2022 15:49:39 +0100 Message-ID: Subject: Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix std::span pretty printer To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++@gcc.gnu.org" 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=-7.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2022 14:49:56 -0000 On Thu, 26 May 2022 at 10:40, Fran=C3=A7ois Dumont wrote: > > On 26/05/22 11:21, Jonathan Wakely wrote: > > On Thu, 26 May 2022 at 00:38, Jonathan Wakely wrot= e: > >> On Thu, 26 May 2022 at 00:34, Jonathan Wakely wro= te: > >>> On Wed, 25 May 2022 at 21:29, Fran=C3=A7ois Dumont via Libstdc++ > >>> wrote: > >>>> Hi > >>>> > >>>> Here is a patch to fix std::span pretty printer in versioned > >>>> namespace mode. > >>>> > >>>> Note that there is still a problem with std::atomic after this= patch. > >>>> > >>>> got: $13 =3D std::atomic> (empty) =3D {get= () =3D 0x0} > >>>> FAIL: libstdc++-prettyprinters/cxx20.cc print spe > >> Does this fix it? > >> > >> --- a/libstdc++-v3/python/libstdcxx/v6/printers.py > >> +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py > >> @@ -1734,6 +1734,7 @@ class StdAtomicPrinter: > >> impl =3D val['_M_impl'] > >> self.shptr_printer =3D SharedPointerPrinter(typename,= impl) > >> self.children =3D self._shptr_children > >> + self.typename =3D self.typename.replace(self.value_ty= pe.tag, typ) > >> > >> def _shptr_children(self): > >> return SmartPtrIterator(self.shptr_printer.pointer) > >> > >> > >> I'll test it with a versioned-namespace build tomorrow. > > No, that didn't work, but the attached patch does. Pushed to trunk. > > Great, I just pushed mine too. I have patches to fix the cxx11.cc printer test for std::__v8::iostream_category() and std::__v8::atomic too.