[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-06-16 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #8 from Martin Sebor --- (In reply to fiesh from comment #7) > On a random related note, the man page says -Wmismatched-new-delete is > enabled by default, but playing around with it, it seems it's only turned on > by -Wall: https://

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-10 Thread fiesh at zefix dot tv via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #7 from fiesh at zefix dot tv --- Thanks for the outline! We'll turn off -Wmismatched-new-delete with GCC 11 and try to switch to the selective opt-out with pragmas in 12. That's a good workaround for now. On a random related note,

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-10 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #6 from Martin Sebor --- That does sound frustrating, sorry. The #pragma has a limitation that can make it difficult to use in inlining contexts. I submitted a patch for it for GCC 11 but it got pushed to GCC 12 (see pr98465 commen

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-09 Thread fiesh at zefix dot tv via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #5 from fiesh at zefix dot tv --- > extern "C" void free (void *); > > class Base > { > public: > Base(); > > void * operator new(unsigned long, const int &); > void operator delete(void * ptr, const int &

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-09 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #4 from Martin Sebor --- -Wmismatched-new-delete considers only "mismatches between calls to operator new or operator delete and the corresponding call to the allocation or deallocation function." It doesn't also consider attribute

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-09 Thread fiesh at zefix dot tv via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #3 from fiesh at zefix dot tv --- * marking operator delete noinline

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-09 Thread fiesh at zefix dot tv via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 --- Comment #2 from fiesh at zefix dot tv --- But this isn't really a solution since I can't inline new without moving a lot of code into the header, and marking `operator new` noinline isn't what I want either. I read both articles prior to mak

[Bug c++/100485] False positive in -Wmismatched-new-delete

2021-05-09 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org Bl