]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/90473 - wrong code with nullptr in default argument.
authorMarek Polacek <polacek@redhat.com>
Thu, 15 Aug 2019 18:33:43 +0000 (18:33 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 15 Aug 2019 18:33:43 +0000 (18:33 +0000)
commit8f236cea1dd0d7f4cd57e530e181619420d42fbb
treeb2398b07cc0c7bded5829a7ab5d36bb4d7f15562
parent9be0b095c9e1864a476d41faf84ad1d314f0ac47
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.

From-SVN: r274546
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp0x/nullptr42.C [new file with mode: 0644]