• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Any compiler warning for default copy constructors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Any compiler warning for default copy constructors?
      • From: Chris Espinosa <email@hidden>
    • Re: Any compiler warning for default copy constructors?
      • From: Steve Baxter <email@hidden>
References: 
 >Any compiler warning for default copy constructors? (From: Scott Fraser <email@hidden>)

  • Prev by Date: Re: Distributed Builds - Overloading System
  • Next by Date: Re: Any compiler warning for default copy constructors?
  • Previous by thread: Any compiler warning for default copy constructors?
  • Next by thread: Re: Any compiler warning for default copy constructors?
  • Index(es):
    • Date
    • Thread