[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] GCC 4.5.2, replacement new/delete,
From:       Zouzou <internet () 123gen ! com>
Date:       2011-01-24 17:38:05
Message-ID: 4D3DB8FD.7090200 () 123gen ! com
[Download RAW message or body]

On 24/01/11 18:10, Jack Ambler wrote:
> My project is using GCC 3.4.5, and I'm working on upgrading to GCC
> 4.5.2.  The one problem I'm having trouble with has to do with
> replacement new/delete.
> 
> Specifically, the replacement delete isn't getting called when a
> stringstream object is deleted.  Below is a sample program that
> demonstrates the issue.   A cout is executed for both new/delete.
> However, only the new's cout gets executed.
> 
> I tested this example on mingw 3.4.5, and FWIW, ubuntu, gcc 4.4.5.  Both
> printed messages for new and delete.  Mingw GCC 4.5.2 skips the delete.

if it's any help, note that adding -static-libstdc++ to the compile 
flags changes the output.

without -static-libstdc++:
void* operator new(size_t) 18

with -static-libstdc++:
void* operator new(size_t) 18
void* operator new(size_t) 18
void operator delete(void*) 23
void operator delete(void*) 23

Zouzou

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic