[Bug middle-end/100876] [11 Regression] -Wmismatched-new-delete should understand placement new when it's not inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100876 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #8 from Martin Sebor --- Backported to GCC 11.2.
[Bug middle-end/100876] [11 Regression] -Wmismatched-new-delete should understand placement new when it's not inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100876 --- Comment #7 from CVS Commits --- The releases/gcc-11 branch has been updated by Martin Sebor : https://gcc.gnu.org/g:00bf3e4d12944e659b3a3706ca720f1d6346e610 commit r11-8607-g00bf3e4d12944e659b3a3706ca720f1d6346e610 Author: Martin Sebor Date: Thu Jun 17 12:22:28 2021 -0600 Backported from trunk: Consider size_t mangling as unsigned int and long [PR100876]. gcc/ChangeLog: PR middle-end/100876 * builtins.c: (gimple_call_return_array): Account for size_t mangling as either unsigned int or unsigned long
[Bug middle-end/100876] [11 Regression] -Wmismatched-new-delete should understand placement new when it's not inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100876 --- Comment #6 from CVS Commits --- The releases/gcc-11 branch has been updated by Martin Sebor : https://gcc.gnu.org/g:fbafba7114939b279e860198d009d7641f3ce49c commit r11-8606-gfbafba7114939b279e860198d009d7641f3ce49c Author: Martin Sebor Date: Thu Jun 17 12:18:53 2021 -0600 Backported from trunk: Teach compute_objsize about placement new [PR100876]. Resolves: PR c++/100876 - -Wmismatched-new-delete should understand placement new when it's not inlined gcc/ChangeLog: PR c++/100876 * builtins.c (gimple_call_return_array): Check for attribute fn spec. Handle calls to placement new. (ndecl_dealloc_argno): Avoid placement delete. gcc/testsuite/ChangeLog: PR c++/100876 * g++.dg/warn/Wmismatched-new-delete-4.C: New test. * g++.dg/warn/Wmismatched-new-delete-5.C: New test. * g++.dg/warn/Wstringop-overflow-7.C: New test. * g++.dg/warn/Wfree-nonheap-object-6.C: New test. * g++.dg/analyzer/placement-new.C: Prune out expected warning.
[Bug middle-end/100876] [11 Regression] -Wmismatched-new-delete should understand placement new when it's not inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100876 --- Comment #5 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:71790f398e119c7fed867b0cfce60a7500629dff commit r12-1490-g71790f398e119c7fed867b0cfce60a7500629dff Author: Martin Sebor Date: Tue Jun 15 12:42:06 2021 -0600 Consider size_t mangling as unsigned int and long [PR100876]. gcc/ChangeLog: PR middle-end/100876 * builtins.c: (gimple_call_return_array): Account for size_t mangling as either unsigned int or unsigned long
[Bug middle-end/100876] [11 Regression] -Wmismatched-new-delete should understand placement new when it's not inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100876 Martin Sebor changed: What|Removed |Added Summary|-Wmismatched-new-delete |[11 Regression] |should understand placement |-Wmismatched-new-delete |new when it's not inlined |should understand placement ||new when it's not inlined --- Comment #4 from Martin Sebor --- Fixed in GCC 12. Since this fixes a false positive I think it can be backported even if it also fixes a false negative. I'll plan to do it for GCC 11.2 unless there are objections.