PR c++/98305 spurious -Wmismatched-new-delete on template instance
authorMartin Sebor <msebor@redhat.com>
Wed, 6 Jan 2021 20:36:18 +0000 (13:36 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 6 Jan 2021 20:36:18 +0000 (13:36 -0700)
commitfd64f348a6b40621dc2bcc743f5fdfb31ed0894c
tree75f82d459a18ec7eb99c5a8017c03ae08303d2d9
parent334a295fafdf5e66c4c976874282aea959830eb6
PR c++/98305 spurious -Wmismatched-new-delete on template instance

gcc/ChangeLog:

PR c++/98305
* builtins.c (new_delete_mismatch_p): New overload.
(new_delete_mismatch_p (tree, tree)): Call it.

gcc/testsuite/ChangeLog:

PR c++/98305
* g++.dg/warn/Wmismatched-new-delete-3.C: New test.
gcc/builtins.c
gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-3.C [new file with mode: 0644]