This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A bug in g++ compiler


Martin v. Loewis writes:
 > >   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
 > 

Hi Martin!

Thank you for your reply.

No, it is not temporary object, but it is not imporant.

Why ?? Because it is res instance that is destroyed, not temporary
object !!

GDB nicely reports that a destructor for Result res from the above
line 18 is invoked to destroy res, AFTER operator= has been executed
!!!

And, I would be very happy to send a complete qsource for
inspection. It is GPL , anyway. Just tell me where to send it please!

I wish to help make a better gcc compiler, which is the best in the
world already !!

For the moment I made a work around for the above gcc bug, but it is a 
costly workaround in terms of memory and speed !!

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@tcx.se            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@cytanet.com.cy|
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]