From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB0E5396D834; Sun, 20 Nov 2022 13:00:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB0E5396D834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668949254; bh=cClNpHyQi78UzsNCFuvoiFWxkQ+vBlOU9SH4k7jLqcc=; h=From:To:Subject:Date:From; b=yVsHLqb44y6nV8szEA/aAMwEsQvUhtAtsJgJnxyDa4Tcd6AAOrEiXmqHWjBumksJf AYToSqGTDZTZCDnDn8bxRKIEXz2W5bsOXioKOoLCn3UeHybcmzvScIoPMpUHY7DVL8 /zrwOfYKcFT2dVmTbHc3wz4w6Odl06R8yhu/HdI8= From: "eaneiros at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107768] New: Bogus -Wzero-as-null-pointer-constant in coroutine Date: Sun, 20 Nov 2022 13:00:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eaneiros at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107768 Bug ID: 107768 Summary: Bogus -Wzero-as-null-pointer-constant in coroutine Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eaneiros at gmail dot com Target Milestone: --- Created attachment 53930 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53930&action=3Dedit Sample code I was trying one of the cppreference coroutine examples and encountered what appears to be a false positive for -Wzero-as-null-pointer-constant. See attached for sample code. According to godbolt.org this happens in gcc trunk. To trigger it just comp= ile with -Wzero-as-null-pointer-constant. Godbolt link: https://godbolt.org/z/41aMEErx4=