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

            Bug ID: 77712
           Summary: int() is incorrectly treated as a null pointer
                    constant in C++11 and later
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

GCC accepts

int *p = int();

even though per DR 903, only integer literals with the value zero are null
pointer constants.

This causes http://stackoverflow.com/q/39662995/2756719.

Reply via email to