This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


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

Re: gcc bug - temporary objects not destroyed properly


Hi Andy,

> I've seen something similar with gcc 2.95 under Cygwin.  The main difference
> was that I had at least one virtual method in my class.  The compiler (using
> the -Wall option) mentioned that I should declare a *virtual* destructor.

Yes, I always compile with -Wall -pedantic and it complains vigorously if
you don't accompany virtual functions with a virtual destructor!

> The one I created was was essentially empty, and seemed to fix the problem
> (though I'm not completely certain why that was).  This might be something
> that could fix your problem if you want to continue using GCC 2.95.x

Yes, thanks - I'll give it a go. The actual class that caused the original
problem is one of the few in our application without any virtuality so that
might well be significant.

> BTW, I was not able to repeat the error using GCC 3.0.1 (though there were
> some simple-to-fix compiler errors).  You might want to consider upgrading.

I did install 3.0.1 and got my code to compile okay with it. But we went back
to 2.95 becaues 3.0.1 seems soooo slow at C++ (and 2.96 so dodgy! :-) It's
another good thing to try though.

Cheers

-- 
David Acton
Alphawave Ltd

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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