[Bug c++/107768] New: Bogus -Wzero-as-null-pointer-constant in coroutine

eaneiros at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Nov 20 13:00:38 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107768

            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=53930&action=edit
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 compile
with -Wzero-as-null-pointer-constant.

Godbolt link: https://godbolt.org/z/41aMEErx4


More information about the Gcc-bugs mailing list