{"id":808307,"url":"http://patchwork.ozlabs.org/api/patches/808307/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/20170831164716.GA21975@redhat.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170831164716.GA21975@redhat.com>","list_archive_url":null,"date":"2017-08-31T16:47:16","name":"PR c++/82039 suppress -Wzero-as-null-pointer-constant warning","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"836db0ac39fc52fc6e05e83ecaf6375ed35b3553","submitter":{"id":48004,"url":"http://patchwork.ozlabs.org/api/people/48004/?format=json","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/20170831164716.GA21975@redhat.com/mbox/","series":[{"id":872,"url":"http://patchwork.ozlabs.org/api/series/872/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=872","date":"2017-08-31T16:47:16","name":"PR c++/82039 suppress -Wzero-as-null-pointer-constant warning","version":1,"mbox":"http://patchwork.ozlabs.org/series/872/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/808307/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808307/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-return-461217-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461217-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"RxJdar0G\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jwakely@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjpFy59HYz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 02:47:49 +1000 (AEST)","(qmail 107855 invoked by alias); 31 Aug 2017 16:47:29 -0000","(qmail 107092 invoked by uid 89); 31 Aug 2017 16:47:29 -0000","from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 31 Aug 2017 16:47:19 +0000","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.14])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id EB0514A706;\n\tThu, 31 Aug 2017 16:47:17 +0000 (UTC)","from localhost (unknown [10.33.36.109])\tby smtp.corp.redhat.com\n\t(Postfix) with ESMTP id 9F5F05D9CB;\n\tThu, 31 Aug 2017 16:47:17 +0000 (UTC)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:subject:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=mPpxp3oBRunXBv00gd2z85DwD1rHiFCtO4D5ATdkjjEUjy83oTUmM\n\t9EfQ3IDZYi61nxNBZQf/u0jXRzFtLV1rj6gRE6h3L1Onpd4wF/ntuvzs9A6OAECK\n\t2Lce9DXaCvDpFIXDmy8yWVXer9fHIoubIWi33sm7SUMfNM2roAD12c=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=EFYlT65xQnAFnGCRFnWE3XJkg/E=; b=RxJdar0GVzLCJ21oEKvN\n\tF2cO8kVxadR2yHQJo8CFdMfQO13SHLmSdME2SRfBQs/wg089KSXC2c1ConVg8OSP\n\tbiD5EhFO5FR+7Y24bOahfWWjDvC0RIX+bFliAk5zSo/7XxpD1oAL1xd3xydNj5wZ\n\t5lw/owtne2GGNttR2eJZi3I=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:jwakely","X-Spam-User":"qpsmtpd, 2 recipients","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com EB0514A706","Date":"Thu, 31 Aug 2017 17:47:16 +0100","From":"Jonathan Wakely <jwakely@redhat.com>","To":"libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","Subject":"[PATCH] PR c++/82039 suppress -Wzero-as-null-pointer-constant\n\twarning","Message-ID":"<20170831164716.GA21975@redhat.com>","MIME-Version":"1.0","Content-Type":"multipart/mixed; boundary=\"HlL+5n6rz5pIUxbD\"","Content-Disposition":"inline","X-Clacks-Overhead":"GNU Terry Pratchett","User-Agent":"Mutt/1.8.3 (2017-05-23)"},"content":"This avoids an unhelpful warning from a system header. Users can't\nchange the code to avoid the warning, and we don't want to change it\n(because it needs to work for C++98 as well as later versions).\n\n\tPR c++/82039\n\t* include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate):\n\tAdjust null pointer constant to avoid warning\n\nTested powerpc64le-linux, committed to trunk.\ncommit 84cedda4ddf90070f8b5d9132be1bf401183cf1c\nAuthor: Jonathan Wakely <jwakely@redhat.com>\nDate:   Thu Aug 31 12:25:34 2017 +0100\n\n    PR c++/82039 suppress -Wzero-as-null-pointer-constant warning\n    \n            PR c++/82039\n            * include/ext/new_allocator.h (__gnu_cxx::new_allocator::allocate):\n            Adjust null pointer constant to avoid warning.","diff":"diff --git a/libstdc++-v3/include/ext/new_allocator.h b/libstdc++-v3/include/ext/new_allocator.h\nindex ee64b9c6447..e1e152c4bf0 100644\n--- a/libstdc++-v3/include/ext/new_allocator.h\n+++ b/libstdc++-v3/include/ext/new_allocator.h\n@@ -96,7 +96,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n       // NB: __n is permitted to be 0.  The C++ standard says nothing\n       // about what the return value is when __n == 0.\n       pointer\n-      allocate(size_type __n, const void* = 0)\n+      allocate(size_type __n, const void* = static_cast<const void*>(0))\n       {\n \tif (__n > this->max_size())\n \t  std::__throw_bad_alloc();\n","prefixes":[]}