A bug in g++ compiler

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Thu Nov 25 11:56:00 GMT 1999


>   Result res = query.store();  /////// line 18
[...]
> What happens. AFTER operator= has executed, GDB displays that
> RedUse::~ResUse is executed on res object from line 18 !!!!!!
> 
> Comments ??

Thanks for your bug report. Unfortunately, it is useless; please read

http://egcs.cygnus.com/faq.html#bugreport

Please note that this is a copy-initialization, not an assignment, so
operator= is not invoked.

My guess is that query.store returns a temporary object which gets
destroyed. Without complete source, this is hard to tell.

Regards,
Martin


More information about the Gcc-bugs mailing list