Re: Any compiler warning for default copy constructors?
Re: Any compiler warning for default copy constructors?
- Subject: Re: Any compiler warning for default copy constructors?
- From: "Clark Cox" <email@hidden>
- Date: Wed, 22 Feb 2006 21:18:34 -0500
Maybe "-Weffc++" will help you.
On 2/22/06, Scott Fraser <email@hidden> wrote:
> Is there a gcc compiler warning that would flag function call arguments
> that use a default copy constructor on an object-valued parameter? I
> just spent way too much time debugging a problem where I inadvertently
> called a function with an object, instead of the address of the object.
> The default copy constructor did a shallow copy on entry to the
> function. On exit, the destructor did a deep delete, removing the
> entire tree that was being pointed to.
>
> Talk about shooting myself in the foot! :-(
>
> Scott
> -----
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
Clark S. Cox III
email@hidden
My CV/Resume:
http://homepage.mac.com/clarkcox3/files/Resume.pdf
http://homepage.mac.com/clarkcox3/files/Resume.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden