From patchwork Fri Sep 16 16:18:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp829059wrt; Fri, 16 Sep 2022 09:20:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6NAe9GU2tDIZJ1gU4g3LXJ0DVODfUCgFCLhSyIDGqx3YcKXPlE/hWGcl5K8Po2JdMi3ydI X-Received: by 2002:a05:6402:10cc:b0:446:491f:d6dd with SMTP id p12-20020a05640210cc00b00446491fd6ddmr4562488edu.360.1663345222210; Fri, 16 Sep 2022 09:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663345222; cv=none; d=google.com; s=arc-20160816; b=VA9+iNuseZDmYfgLNRMwzh2EWg4o07vDLJexX0au5eiP5bWMbt88AmfH1RE0zbjVoz PaCiqhVniSOXkpZoH6PneNfE5pR3C+hC/ye9e3UEudsub4ykqIJRXRrLA+JsX2Mg2rFf vvN3M1daeHWRM2iPGi+zZcSi28BirxP+/3lY9LTiOxFgK8Q8sWZP9hfEA130yLel7WLL /7Ovu3GmG+c0mHEWHQs7aFCneMmIflhEUM614MOK0SK1Ae4dQ+iWgS+ky+l46wINy1f8 cGeNWKar874hpo7d5lECrauvnQzLBLQj4FJ6mnQKOgqtvTU2pYCiFRdKDRcb7P5g9PEA hA4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Rgqs7Ai/wBTdzpraUjacupM/aafjQC15NnKvXafilxU=; b=IN+H/1p+5XD6D7/TWw3Pi4hAg6miiOTJuqOo8v6YN3vceKosAyAKJv2AKQigZqmQOm PHnvlIHC8A1PV6s+QAkmPaeWoeXTatN+IfSfMXLwjhwMblXTlyImCKKVZfywR4+dEuWo WTnPo2K1jN0R+b91LVwxXsrwtliy11tnr4ex+E0iLlKGBTUS8pckXXuwcPb0/jIQjE9s zQJLMPdbR4OJhO/zg3KpR+4oDGo5rxJJuqdwOOcL4fRpP9f9IdJ5cZ1tl6RxmU/KPLqN //Ak3P+Y7lphqUdQNWZGMBYXNBv1N7In8YcJA9OPyaDgJmm6Y4fJuxoMVVTWanLTLwze U8QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f8Cr2omi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p20-20020a1709060dd400b0078054af5eeasi3981805eji.374.2022.09.16.09.20.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 09:20:22 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f8Cr2omi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1CB6038A90B4 for ; Fri, 16 Sep 2022 16:19:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CB6038A90B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663345156; bh=Rgqs7Ai/wBTdzpraUjacupM/aafjQC15NnKvXafilxU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=f8Cr2omi2vI0Nrdwtwc1mdAJKyIA4Wo1Xivpj9UeuTCaLEXN3bcv5diExfBijSaIO r9ZG9rMtAyn3WmyeSrUd3GwPpk+ZLodRxBjaxgqSAYAE7iOimmtfUq3ZB9uZZ8m2m/ RwKZrc5XtqPJ/vEhGxV5+9Y7uBwzmJYnKTI92xbI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 DC04538115BE for ; Fri, 16 Sep 2022 16:18:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC04538115BE Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-581-y_BJM-L5O6SACp9s3j2JAg-1; Fri, 16 Sep 2022 12:18:28 -0400 X-MC-Unique: y_BJM-L5O6SACp9s3j2JAg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B9A91101AA66; Fri, 16 Sep 2022 16:18:27 +0000 (UTC) Received: from localhost (unknown [10.33.36.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8361440C6EC3; Fri, 16 Sep 2022 16:18:27 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Do not use nullptr in C++03-compatible code Date: Fri, 16 Sep 2022 17:18:26 +0100 Message-Id: <20220916161826.510606-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1744143879751250736?= X-GMAIL-MSGID: =?utf-8?q?1744143879751250736?= Tested x86_64-linux, pushed to trunk. -- >8 -- This has to be valid as C++98/C++03. libstdc++-v3/ChangeLog: * include/debug/formatter.h [_GLIBCXX_DEBUG_BACKTRACE] (_Error_formatter): Use 0 as null pointer constant. --- libstdc++-v3/include/debug/formatter.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/debug/formatter.h b/libstdc++-v3/include/debug/formatter.h index b4b72383e22..f120163c6d4 100644 --- a/libstdc++-v3/include/debug/formatter.h +++ b/libstdc++-v3/include/debug/formatter.h @@ -609,8 +609,7 @@ namespace __gnu_debug , _M_function(__function) #if _GLIBCXX_HAVE_STACKTRACE # ifdef _GLIBCXX_DEBUG_BACKTRACE - , _M_backtrace_state( - __glibcxx_backtrace_create_state(nullptr, 0, nullptr, nullptr)) + , _M_backtrace_state(__glibcxx_backtrace_create_state(0, 0, 0, 0)) , _M_backtrace_full(&__glibcxx_backtrace_full) # else , _M_backtrace_state()