https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123881
--- Comment #7 from home at slipbits dot com --- On 1/30/2026 3:58 AM, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123881 > > Jonathan Wakely <redi at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |RESOLVED > Resolution|--- |INVALID > > --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- > opr.add(*new Operator(boolOP, "boolOP")); > > This is not how you use C++. This looks like misunderstanding based on Java > idioms. > > This should be simply opr.add(Operator(boolOP, "boolOP")) without using 'new' > and without leaking memory on every line. > > OpClass& opr = *new OpClass();// instantiation of container class > > Again, this is not how you use C++. This should be: > > OpClass opr; > > That's it, stop using 'new' to create objects that don't need to be on the > heap. > > Since there is no testcase provided, but the code snippets are full of > problems, I'm going to assume this is INVALID. Please reopen if you can show > there's a real bug in GCC and not in your code. > > Please follow the advice in the bug writing guidelines: > > "if compiling with -fsanitize=address,undefined produces any run-time errors, > then your code is probably not correct." > > "We also ask that for C++ code, users test their programs with > -D_GLIBCXX_ASSERTIONS." Thank you. I will follow your advice and apologize for creating a bug report for something that is not a bug. I try not to do that. I have a great deal of respect for the work you all do, and look at your product as being of high quality.
