• 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: Tiger Build Warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiger Build Warnings


  • Subject: Re: Tiger Build Warnings
  • From: Steve Checkoway <email@hidden>
  • Date: Thu, 23 Jun 2005 10:28:11 -0700


On Jun 23, 2005, at 10:15 AM, Ben Cox wrote:

On Jun 23, 2005, at 11:18 AM, Steve Checkoway wrote:

this one.) Actually adding a virtual destructor as Richard suggests would cause problems with the vtable layout, which would interfere with COM-like use of the interface class.



How would that cause problems with the vtable layout and how would that interfere with the COM-like use?



The virtual destructor has to be in the vtable somewhere. COM expects a specific vtable layout, with the methods in a predictable order and without extra vtable slots between an interface's methods and those of a derived interface. Adding a virtual destructor inserts such a slot, and furthermore does it in a compiler-specific place, so in COM it is verboten.

How can it expect a particular vtable layout? It seems to me that that could change with a different compiler version. Also, depending on the vtable layout seems like a bad idea but I guess for binary compatibility, there isn't much one can do.


In general it ought to be possible to suppress any warning once you're sure you understand why the warning was issued and can demonstrate to your satisfaction that the warning doesn't apply to you. (MSVC is fine-grained enough that you can use a #pragma to turn off a warning in your source, and then turn it back on again a few lines later, which is kinda nice.) Many shops compile with "warnings as errors" and then turn off the warnings that they expect and have dealt with; this is generally considered a good practice.

It's "kinda nice" but it is a little ugly to see a bunch of the #pragma statements throughout the code.


The compiler wants to warn you whenever you point a gun at your foot, but if you've ensured that the safety is on or the gun is unloaded, it should be possible to say "yes I understand but I'm going to do it anyway."

That is a colorful analogy.

- Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Tiger Build Warnings
      • From: Ben Cox <email@hidden>
    • Re: Tiger Build Warnings
      • From: Herbie Robinson <email@hidden>
References: 
 >Tiger Build Warnings (From: "Mark's Studio" <email@hidden>)
 >Re: Tiger Build Warnings (From: Jeff Moore <email@hidden>)
 >Re: Tiger Build Warnings (From: Ben Cox <email@hidden>)
 >Re: Tiger Build Warnings (From: Jeff Moore <email@hidden>)
 >Re: Tiger Build Warnings (From: Richard Dobson <email@hidden>)
 >Re: Tiger Build Warnings (From: Ben Cox <email@hidden>)
 >Re: Tiger Build Warnings (From: Steve Checkoway <email@hidden>)
 >Re: Tiger Build Warnings (From: Ben Cox <email@hidden>)

  • Prev by Date: Re: Tiger Build Warnings
  • Next by Date: Re: Tiger Build Warnings
  • Previous by thread: Re: Tiger Build Warnings
  • Next by thread: Re: Tiger Build Warnings
  • Index(es):
    • Date
    • Thread