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://
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,
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
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 &
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485
--- Comment #3 from fiesh at zefix dot tv ---
* marking operator delete noinline
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100485
Martin Sebor changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
Bl