https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90473
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Thu Aug 15 18:33:43 2019 New Revision: 274546 URL: https://gcc.gnu.org/viewcvs?rev=274546&root=gcc&view=rev Log: PR c++/90473 - wrong code with nullptr in default argument. * call.c (null_ptr_cst_p): Update quote from the standard. * decl.c (check_default_argument): Don't return nullptr when the arg has side-effects. * g++.dg/cpp0x/nullptr42.C: New test. Added: branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/nullptr42.C Modified: branches/gcc-9-branch/gcc/cp/ChangeLog branches/gcc-9-branch/gcc/cp/call.c branches/gcc-9-branch/gcc/cp/decl.c